HardYards/web/world/js/tests
m3ultra 11f27c493c Fix debris ground friction, cloud seam and yard coords
Three bugs the bench found once it was actually running a storm:

- Debris was glued to the floor. The scrape `v *= 0.86` ran every frame while
  grounded, which is 0.86^60 per second — it pinned a 9 kg crate at 0.7 m/s in
  a 19 m/s wind. Friction now applies on impact, with dt-scaled rolling
  friction while resting. A crate crosses the whole yard at ~6 m/s.
- Debris slid instead of tumbling: wind is horizontal, so once down there was
  no vertical force at all and it skated at constant height. Added tumbling
  lift that flips sign as it rolls — bins hop now.
- The cloud dome had a dead straight seam across the sky. The fbm claimed to
  tile and didn't; now each octave wraps at its own integer period.

Also: shelters and the bench now use Lane A's landed yard coords (t1 -9,2 /
t2 8,-2, gardenBed 1,2) instead of my guesses, so shelter tuning means
something.

Verified in-browser against a real storm: crate crosses the yard and the t=74
bin spawns from storm JSON; sail node shoved 0.32 m; a 14 kg bin at 20 m/s
knocks the player down and a tub drifting at 0.3 m/s correctly does not;
lightning peaks 0.88. Lane A's selftest: 37 pass / 3 skip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 21:50:41 +10:00
..
a.test.js Add selftest harness with one suite per lane 2026-07-16 21:33:42 +10:00
b.test.js Add selftest harness with one suite per lane 2026-07-16 21:33:42 +10:00
c.test.js Add debris, skyfx and the Lane C bench; align to landed contracts 2026-07-16 21:38:21 +10:00
d.test.js Add selftest harness with one suite per lane 2026-07-16 21:33:42 +10:00
e.test.js Add selftest harness with one suite per lane 2026-07-16 21:33:42 +10:00
run-node.mjs Add wind field, storm timelines and weather selftest 2026-07-16 21:38:12 +10:00
weather.selftest.js Fix debris ground friction, cloud seam and yard coords 2026-07-16 21:50:41 +10:00