Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
e0d4322
Midnight Ops first-person arms: bent elbows instead of straight poles
claude Nov 20, 2026
c7eef64
Merge the characters' arm fixes (war-chars e0d4322: bent left elbow, …
claude Nov 20, 2026
f783932
Midnight Ops: own rifle sprint-carry offset removed (the arms' clip c…
claude Nov 20, 2026
272ba99
Midnight Ops first-person arms: pistol ADS thumb wrapped, faster arm …
claude Nov 21, 2026
40fd047
Merge the characters' pistol thumb and raise fix (war-chars 272ba99) …
claude Nov 21, 2026
5a0eeb3
Merge the site's current main (upmain b470aad, with the loader and pu…
claude Nov 21, 2026
882eb03
Midnight Ops: first-person material copies keep the source's defines …
claude Nov 21, 2026
28b5362
Merge Arjun's main into war-game
claude Nov 22, 2026
d6226f0
Midnight Ops: flash, tracer and cases start at the drawn muzzle at an…
claude Nov 22, 2026
f967799
Midnight Ops: recoil as a kept part plus a held transient, tuned per gun
claude Nov 22, 2026
3094a59
Midnight Ops: the spread cone eases toward its target instead of jumping
claude Nov 22, 2026
e9f8e30
Midnight Ops: enemies take turns, warn before they fire, and get accu…
claude Nov 22, 2026
82890de
Midnight Ops: one failing subsystem no longer stops the game; health …
claude Nov 22, 2026
509a865
Midnight Ops: bevelled boxes for trim and props
claude Nov 22, 2026
ec76745
Midnight Ops: wear baked into wall colours (grime band, drip streaks,…
claude Nov 22, 2026
5343445
Midnight Ops: wetness by exposure and material, rooms stay dry, specu…
claude Nov 22, 2026
d02ff60
Midnight Ops: one shared puddle and rut map for the ground, footsteps…
claude Nov 22, 2026
956787d
Midnight Ops: enemies announce each round (IV.emit('enemyFire')) so c…
claude Nov 22, 2026
7a18e75
Midnight Ops: painted signs and stencils in one atlas (env/labels.js)
claude Nov 22, 2026
d1aeb99
Midnight Ops: post stack can draw the first-person view inside the HD…
claude Nov 22, 2026
4d47dae
Midnight Ops: frame-time governor with dynamic internal resolution an…
claude Nov 22, 2026
3aca386
Midnight Ops: lightning inside the cloud deck, cloud relief, a low mo…
claude Nov 22, 2026
2b1e61c
Midnight Ops: dense dressing along the lanes, the hamlet street and t…
claude Nov 22, 2026
e85905d
Midnight Ops: sign ray casts pass the camera (sprites in the scene ne…
claude Nov 22, 2026
44f1e66
Midnight Ops: a new audio engine - pre-rendered sound variants, a fix…
claude Nov 22, 2026
95e50a4
Midnight Ops: impacts spray along the ricochet, puddles splash, metal…
claude Nov 22, 2026
6a24ca7
Midnight Ops: up to four damage arcs at once, each following its shoo…
claude Nov 22, 2026
f8b0822
Midnight Ops: IV.fx.sys() exposes the particle systems for checks
claude Nov 22, 2026
262f1b0
Midnight Ops: ?bench frame-time run and a ?q quality override; softwa…
claude Nov 22, 2026
431568b
README: Midnight Ops enemy turns and telegraphs, recoil, audio engine…
claude Nov 22, 2026
f5c0afd
Midnight Ops: a soldier who cannot start his granted burst passes the…
claude Nov 22, 2026
207b3d3
Midnight Ops: lightning in the cloud is a local glow, not a floodlit sky
claude Nov 22, 2026
55cd44b
Midnight Ops: governor steps up only when the next step is predicted …
claude Nov 22, 2026
492be27
README: Midnight Ops world-look notes (bevels, baked wear, wet map, l…
claude Nov 22, 2026
e836e96
Midnight Ops: the wet map's churned mud does not slow the player
claude Nov 22, 2026
f8a4e2f
Midnight Ops: sign posts no longer stand in front of the text
claude Nov 22, 2026
11f00db
Midnight Ops: shop fascias and hut numbers join the label atlas; sign…
claude Nov 22, 2026
81da81a
Midnight Ops: carved text weathers instead of chipping; drop the cafe…
claude Nov 22, 2026
9f58932
Midnight Ops: recoil recovers in game time, not per drawn frame
claude Nov 22, 2026
e76c417
Midnight Ops: cap the baked-wear subdivision (it doubled the hamlet's…
claude Nov 22, 2026
40a08c8
Midnight Ops: flush held-back wall quads before buckets are merged or…
claude Nov 22, 2026
f661932
Midnight Ops: wet map without grid-edged water, and far less of it
claude Nov 22, 2026
997ab07
Midnight Ops: bevel only what is seen close (not field walls, fences …
claude Nov 22, 2026
b5055d6
Midnight Ops: no kilometre stone on the sunken lane (the stealth route)
claude Nov 22, 2026
6021b96
Midnight Ops: recoil snaps in within 40 ms and the rifle is back to i…
claude Nov 22, 2026
136af21
Midnight Ops: buildings do not auto-bevel timber (bevels were +16.8 %…
claude Nov 22, 2026
1a215ce
Merge war-feel into war-game (combat feel: recoil, spread, enemy turn…
claude Nov 22, 2026
02a4315
Merge war-world into war-game (bevels, baked wear, wetness, puddle ma…
claude Nov 22, 2026
cca8dbe
Midnight Ops: a soldier fires as his warning ends and stays up for hi…
claude Nov 22, 2026
06ef615
Midnight Ops: Spanish for the ammo cue and the enemy 'ready' call-outs
claude Nov 22, 2026
5a75366
Midnight Ops: portrait subtitles use the full width (a long line no l…
claude Nov 22, 2026
3e5b166
Merge Arjun's main (Ironwing) into war-game
claude Nov 22, 2026
c88ee08
Midnight Ops: the post stack's pixel cap is opt-in, so Ironwing keeps…
claude Nov 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md

Large diffs are not rendered by default.

Binary file modified e63334287a3deaa3/ironveil/assets/fp.glb
Binary file not shown.
702 changes: 355 additions & 347 deletions e63334287a3deaa3/ironveil/assets/fp.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion e63334287a3deaa3/ironveil/chars.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
var SCRIPT = document.currentScript && document.currentScript.src;
var BASE = SCRIPT ? SCRIPT.replace(/[^\/]*$/, '') : '';
var ASSETS = BASE + 'assets/';
var VERSION = '10'; // bump whenever any file in assets/ changes, so browsers fetch the new copies
var VERSION = '12'; // bump whenever any file in assets/ changes, so browsers fetch the new copies

// ---------- kinds and files
var FILES = {
Expand Down
36 changes: 27 additions & 9 deletions e63334287a3deaa3/ironveil/env/atmosphere.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
},
night_rain: {
skyTop: 0x06080b, skyHor: 0x1a1e24, ground: 0x0b0c0d, fog: 0x161a1f, fogD: 0.016, mist: 0.6, mistTop: 2.0,
sunDir: [-0.5, 0.74, 0.45], sunCol: 0x8a96aa, sunI: 0.5, sunShadow: false, moon: 0, stars: 0, cloud: 1.0, cloudCol: 0x1a1d22,
hemiSky: 0x5a6476, hemiGround: 0x2a2826, hemiI: 1.0, env: 0.5, exposure: 1.1, wind: 1.1, wet: 1.0, rain: 1, grade: 'rain'
// key: a low, cool moon through a ragged gap in the deck (lit side, dark side and a rim on everything; a long
// glint toward it on wet ground); the fill drops so the key reads. Moon shadows on High only (shadowHi).
sunDir: [-0.78, 0.3, 0.5], sunCol: 0x9fb0d0, sunI: 1.45, sunShadow: true, shadowHi: 1, moon: 0.55, gap: 1, stars: 0, cloud: 1.0, cloudCol: 0x1a1d22,
hemiSky: 0x56606f, hemiGround: 0x262422, hemiI: 0.74, env: 0.5, exposure: 1.1, wind: 1.1, wet: 1.0, rain: 1, grade: 'rain'
},
dusty: {
skyTop: 0x9a9284, skyHor: 0xc8b89c, ground: 0x6a5c48, fog: 0xb8a78a, fogD: 0.012, mist: 0.0, mistTop: 1.0,
Expand All @@ -39,7 +41,7 @@
},
dusk_rain: {
skyTop: 0x1a1f28, skyHor: 0x4a4c50, ground: 0x151617, fog: 0x34383d, fogD: 0.017, mist: 0.6, mistTop: 2.0,
sunDir: [-0.85, 0.22, -0.2], sunCol: 0xb79a88, sunI: 0.55, sunShadow: true, moon: 0, stars: 0, cloud: 1.0, cloudCol: 0x2c3036,
sunDir: [-0.85, 0.22, -0.2], sunCol: 0xb79a88, sunI: 0.75, sunShadow: true, moon: 0, gap: 0.7, stars: 0, cloud: 1.0, cloudCol: 0x2c3036,
hemiSky: 0x7a8494, hemiGround: 0x2e2c2a, hemiI: 0.85, env: 0.8, exposure: 1.0, wind: 1.3, wet: 1.0, rain: 1, grade: 'rain'
},
day_overcast: {
Expand Down Expand Up @@ -100,7 +102,7 @@
// ------------------------------------------------------------------ sky
const SKY_VS = 'varying vec3 vD; void main(){ vD = normalize(position); vec4 p = projectionMatrix * modelViewMatrix * vec4(position,1.0); gl_Position = p.xyww; }';
const SKY_FS = E.GLSL.noise + `
uniform vec3 top, hor, gnd, moonDir, moonCol, cloudCol; uniform float moonAmt, starAmt, cloud, time, bright;
uniform vec3 top, hor, gnd, moonDir, moonCol, cloudCol, flashDir; uniform float moonAmt, starAmt, cloud, time, bright, gap, flash;
varying vec3 vD;
float fbm3(vec2 p){ float s = 0.0, a = 0.5; for (int i = 0; i < 5; i++){ s += a * ivN(p); p = p * 2.03 + 7.1; a *= 0.5; } return s; }
void main(){
Expand Down Expand Up @@ -130,8 +132,22 @@
vec2 cp = d.xz / (h + 0.08) * 1.6 + vec2(time * 0.012, time * 0.005);
float n = fbm3(cp * 0.8);
float cov = smoothstep(1.0 - cloud * 0.85 - 0.12, 1.0 - cloud * 0.85 + 0.25, n + cloud * 0.35);
// a ragged gap in the deck round the key light (the moon or a low sun shows through it, edges torn by the noise)
if (gap > 0.0) { float gd = md + (n - 0.5) * 0.16 + (fbm3(cp * 2.3 + 5.0) - 0.5) * 0.05; cov *= 1.0 - gap * 0.9 * smoothstep(0.9, 0.975, gd); }
// relief: the cloud base sampled again a little toward the light; where it thins toward the light the edge is lit
vec2 ld = normalize(moonDir.xz + 1e-4) * 0.09;
float rel = clamp((n - fbm3((cp + ld) * 0.8)) * 5.0, -1.0, 1.0);
float lit = 0.6 + 0.6 * pow(md, 4.0) * moonAmt + 0.25 * fbm3(cp * 1.7 + 3.0);
lit *= 1.0 + rel * 0.35 * (0.4 + 0.6 * pow(md, 3.0));
vec3 cc = cloudCol * lit;
// lightning inside the deck: a glow centred on this strike's direction, strongest where the cloud is thick,
// with the cloud relief toward it picking out the billows
if (flash > 0.0) {
float fd = max(dot(d, flashDir), 0.0), dens = cov * smoothstep(0.3, 0.75, n);
vec2 fl = normalize(flashDir.xz + 1e-4) * 0.07; float frel = clamp((n - fbm3((cp + fl) * 0.8)) * 4.0, -1.0, 1.0);
float core = pow(fd, 14.0) * (0.15 + 1.6 * dens * dens) * (1.0 + 0.8 * frel), halo = pow(fd, 4.0) * 0.1 * dens;
cc += vec3(0.5, 0.56, 0.74) * flash * (core + halo) * 0.55;
}
// structure: slow darker bands of heavier cloud base, and (by day) a brighter thin patch toward the hidden sun
float band = fbm3(cp * 0.33 + vec2(7.0, 1.3));
cc *= mix(0.68, 1.12, smoothstep(0.32, 0.68, band));
Expand All @@ -147,7 +163,8 @@
return new THREE.ShaderMaterial({
uniforms: {
top: { value: new THREE.Color() }, hor: { value: new THREE.Color() }, gnd: { value: new THREE.Color() }, moonDir: { value: new THREE.Vector3(0, 1, 0) },
moonCol: { value: new THREE.Color(0xdde6ff) }, cloudCol: { value: new THREE.Color() }, moonAmt: { value: 1 }, starAmt: { value: 1 }, cloud: { value: 0.4 }, time: { value: 0 }, bright: { value: 1 }
moonCol: { value: new THREE.Color(0xdde6ff) }, cloudCol: { value: new THREE.Color() }, moonAmt: { value: 1 }, starAmt: { value: 1 }, cloud: { value: 0.4 }, time: { value: 0 }, bright: { value: 1 },
gap: { value: 0 }, flash: { value: 0 }, flashDir: { value: new THREE.Vector3(0.3, 0.4, -0.8).normalize() }
},
vertexShader: SKY_VS, fragmentShader: SKY_FS, side: THREE.BackSide, depthWrite: false, depthTest: true, fog: false, toneMapped: true
});
Expand Down Expand Up @@ -224,9 +241,9 @@
A.dir.set(P.sunDir[0], P.sunDir[1], P.sunDir[2]).normalize();
const u = sky.uniforms;
u.top.value.copy(L(P.skyTop)); u.hor.value.copy(L(P.skyHor)); u.gnd.value.copy(L(P.ground)); u.moonDir.value.copy(A.dir);
u.moonAmt.value = P.moon; u.starAmt.value = P.stars; u.cloud.value = P.cloud; u.cloudCol.value.copy(L(P.cloudCol));
u.moonAmt.value = P.moon; u.starAmt.value = P.stars; u.cloud.value = P.cloud; u.cloudCol.value.copy(L(P.cloudCol)); u.gap.value = P.gap || 0;
if (!P.moon) u.moonCol.value.copy(L(P.sunCol)); else u.moonCol.value.set(0xdde6ff).convertSRGBToLinear();
sun.color.copy(L(P.sunCol)); sun.intensity = P.sunI; sun.castShadow = opts.shadows !== false && P.sunShadow;
sun.color.copy(L(P.sunCol)); sun.intensity = P.sunI; sun.castShadow = opts.shadows !== false && !!P.sunShadow && (P.shadowHi < 0.5 || !P.shadowHi || Q.name === 'high');
hemi.color.copy(L(P.hemiSky)); hemi.groundColor.copy(L(P.hemiGround)); hemi.intensity = P.hemiI;
fog.color.copy(L(P.fog)); fog.near = (opts.fogD || P.fogD) * (opts.fogMul || 1); // opts.fogD: a map's own haze in place of the preset's fog.far = packMist(A.mistBase + P.mistTop - 1.8, P.mist * 0.99);
scene.background = null;
Expand Down Expand Up @@ -267,10 +284,11 @@
for (; k < 4; k++) { const l = ls[k]; if (l) { U.uLamp.value[k].set(l.position.x, l.position.y, l.position.z, Math.min(1.5, l.intensity * 0.5)); U.uLampC.value[k].copy(l.color); } else U.uLamp.value[k].w = 0; }
// lightning: a double flicker every 12-25 s, cool white, on the hemisphere light and the rain
A.flashT = (A.flashT == null ? 8 : A.flashT) - dt;
if (A.flashT < 0) { A.flashT = 12 + Math.random() * 13; A.flashAge = A.flashes ? 0 : 99; const dist = 600 + Math.random() * 2400; if (E.onAmbience) E.onAmbience({ kind: 'thunder', delay: dist / 343, dist }); } // thunder arrives after the sound delay
if (A.flashT < 0) { A.flashT = 12 + Math.random() * 13; A.flashAge = A.flashes ? 0 : 99;
{ const az = Math.random() * Math.PI * 2, el = 0.12 + Math.random() * 0.4; sky.uniforms.flashDir.value.set(Math.cos(az) * Math.cos(el), Math.sin(el), Math.sin(az) * Math.cos(el)); } /* each strike somewhere else in the deck */ const dist = 600 + Math.random() * 2400; if (E.onAmbience) E.onAmbience({ kind: 'thunder', delay: dist / 343, dist }); } // thunder arrives after the sound delay
A.flashAge = (A.flashAge == null ? 99 : A.flashAge + dt);
const f = A.flashAge < 0.07 ? 1 : A.flashAge < 0.16 ? 0 : A.flashAge < 0.24 ? 0.55 : Math.max(0, 0.55 - (A.flashAge - 0.24) * 2.5);
hemi.intensity = A.P.hemiI * (1 + f * 2.5); U.uFlash.value = f;
hemi.intensity = A.P.hemiI * (1 + f * 1.4); U.uFlash.value = f; sky.uniforms.flash.value = f;
}
};
A.set(preset || 'night_moon');
Expand Down
Loading
Loading