HardYards/web/world
m3ultra 6971f31984 Rain stops at the cloth (SPRINT2 Lane C.3)
The garden visibly stays dry under the sail. Rain arrives along the wind, so
the dry patch sits downwind of the cloth and slides across the yard as the
wind swings — at the southerly change it walks right off the bed, free drama
and honest physics.

Cheap on purpose. Ray-testing 3k drops against 162 triangles every frame is
~486k intersections for an effect nobody inspects closely. Instead project the
sail's triangles ALONG the rain onto the ground into a coarse height grid, a
few times a second (the cloth moves slowly next to the rain); per-drop cost is
one grid read, and occluded drops get a zero-scale matrix rather than a
raycast. Measured 0.041 ms/rebuild, 10x/s = 0.41 ms/s against A's 0.63 ms
frame — negligible. Reads rig.pos/rig.tris, so nothing new needed from Lane B.

Verified in the real game with a surviving twisted rated rig: 497 grid cells
covered, 96% of the garden bed under cover, live drops culled under the cloth
and falling in the open yard either side. Screenshot for DESIGN.md.

skyfx exposes rainShadowOver(rect) — NOT the same as rig.coverageOver(bed,
sunDir). That one is the SUN shadow; this is the RAIN shadow (down the wind).
Which drives garden HP is a design call — flagged for A in THREADS.

Selftest 134/0/0 (8 new rain-shadow asserts).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 00:10:29 +10:00
..
data/storms Add vertical gusts, freeze debris.pieces, fix fog restore 2026-07-16 23:58:31 +10:00
js Rain stops at the cloth (SPRINT2 Lane C.3) 2026-07-17 00:10:29 +10:00
models Bake M3 animation pack: 11 new Mixamo clips into player_anims.glb 2026-07-16 23:06:40 +10:00
vendor Vendor three.js r175, add stdlib dev server and launch config 2026-07-16 21:33:42 +10:00
dev_player.html Merge all lanes; add importmap; fix /world/ absolute paths 2026-07-16 22:23:20 +10:00
index.html Assemble the game: real wind, player, sail, sky and debris (gate 1) 2026-07-16 23:38:03 +10:00
selftest.html Merge all lanes; add importmap; fix /world/ absolute paths 2026-07-16 22:23:20 +10:00
weather_demo.html Expose audio state and levels 2026-07-16 21:56:22 +10:00