HardYards/web/world/js
m3ultra 135511fb05 Add vertical gusts, freeze debris.pieces, fix fog restore
SPRINT2 decisions 3 and 5, plus Lane A's fog nit.

Decision 3 — gusts now descend. Cloth pressure goes with dot(wind, normal); a
flat panel's normal points at the sky, so in a perfectly horizontal wind the
dot is ~0 and "lie it flat and ignore the storm" was the cheapest winning rig.
A gust front is descending air, not just faster air. Per-gust downdraft
fraction in storm JSON (storm_02 0.3, storm_01 0.18, default 0.25, validated
0..1), each gust varying 0.6-1.4x. Peak downdraft in storm_02 is 4.4 m/s, 17%
of the horizontal. Lane B: the cloth-side assert is yours.

The vertical draws from its OWN rng stream, and there's an assert pinning
that: pulling it from the main stream would shift every subsequent (t0, pow)
and silently re-time storms Lane A has already hand-verified. Their carabiner
still blows at t=45.4 and cascades at t=56.

speedAt() stays horizontal — an anemometer doesn't read falling air, and a
wind meter that spikes because a gust is descending reads as a bug.

Decision 5 — debris.pieces frozen and documented in contracts.js as the seam
Lane B reads in sail.step(), with the sphere/SI/mutated-in-place semantics
spelled out and an assert tying the live shape to the contract table.

Fog: dispose() captured scene.fog by reference and step() mutates that object
in place, so restoring it restored nothing (Lane A caught it). Now captured by
value, and fog we created ourselves is removed rather than left behind.

Selftest 130/0/0 (was 121); Lane C 28 asserts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 23:58:31 +10:00
..
tests Add vertical gusts, freeze debris.pieces, fix fog restore 2026-07-16 23:58:31 +10:00
camera.js Add graybox yard, third-person camera and game shell 2026-07-16 21:33:42 +10:00
contracts.js Add vertical gusts, freeze debris.pieces, fix fog restore 2026-07-16 23:58:31 +10:00
debris.js Fix debris ground friction, cloud seam and yard coords 2026-07-16 21:50:41 +10:00
interact.js Lane D: the small person — player, interactions, selftests 2026-07-16 21:55:16 +10:00
main.js Assemble the game: real wind, player, sail, sky and debris (gate 1) 2026-07-16 23:38:03 +10:00
player.js Merge all lanes; add importmap; fix /world/ absolute paths 2026-07-16 22:23:20 +10:00
player.sim.js Lane D: the small person — player, interactions, selftests 2026-07-16 21:55:16 +10:00
rigging.js Align sail lane to contracts.js; free blown corners so they flog 2026-07-16 21:55:37 +10:00
rigging.selftest.js Align sail lane to contracts.js; free blown corners so they flog 2026-07-16 21:55:37 +10:00
sail.js Align sail lane to contracts.js; free blown corners so they flog 2026-07-16 21:55:37 +10:00
sail.selftest.js Align sail lane to contracts.js; free blown corners so they flog 2026-07-16 21:55:37 +10:00
skyfx.js Add vertical gusts, freeze debris.pieces, fix fog restore 2026-07-16 23:58:31 +10:00
testkit.js Add selftest harness with one suite per lane 2026-07-16 21:33:42 +10:00
weather.core.js Add vertical gusts, freeze debris.pieces, fix fog restore 2026-07-16 23:58:31 +10:00
weather.js Add debris, skyfx and the Lane C bench; align to landed contracts 2026-07-16 21:38:21 +10:00
world.js Expose the yard's hemisphere light for skyfx 2026-07-16 23:38:03 +10:00