HardYards/web/world/js/tests
m3ultra 7cd25a5d2a Give the gum trees a canopy sway handle
world.js sways a tree by rotating a `canopy` group whose origin sits at the
trunk top, so the blobs swing about the trunk. The trees shipped canopy_01..03
as siblings of `trunk` with each origin at its own blob centre — rotating one
spins a sphere in place, which is visually nothing. Lane A could not have swayed
these trees, and the canopy lean is the gust telegraph the player reads a beat
before it hits the sail, so the tell would have gone missing rather than looked
wrong.

Adds the `canopy` empty at the trunk top with the blobs parented under it, so
A's existing code works unchanged, plus sway_amp / sway_phase / sway_pivot_y
for the per-tree tuning SPRINT2 §Lane E asks for (gum_01 is big and leans less
at 0.85; gum_02 is whippy at 1.20 and shows a gust first).

sway_phase draws from its own RNG stream: taking it from the shared one would
consume a value and shift every blob draw after it, resilhouetting a tree the
other lanes have already tuned against. Exported dims are identical to Sprint 1.

e.test.js asserts the pivot by rotating the handle and measuring that a blob
actually travels — red before this change, green after.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 00:42:30 +10:00
..
a.test.js Add selftest harness with one suite per lane 2026-07-16 21:33:42 +10:00
b.test.js Align sail lane to contracts.js; free blown corners so they flog 2026-07-16 21:55:37 +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 Lane D: the small person — player, interactions, selftests 2026-07-16 21:55:16 +10:00
e.test.js Give the gum trees a canopy sway handle 2026-07-17 00:42:30 +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