guts/docs/progress/a-progress.md
jing 689c478a7f [lane A] Round 1: the canal v0 — spline, streaming tube, scanner wall, arenas
Implements THE WORLD CONTRACT (TECH.md) in web/js/world/; drop-in for the stub.
boot.js now runs this on C's L2_esophagus (3600u, hash cefc4f83), zero console errors.

- spline.js: centreline + arclength LUTs + parallel-transport frames + radius law +
  peristalsis phase + project() + hash(). No three.js import, so qa can run its
  14-assertion selfcheck headless.
- curviness is solved from a curvature budget, not authored as an amplitude: the pinch
  guard caught the tube folding through itself on a wide+curvy join (turn radius 9.9 vs
  tube radius 17.2). C can no longer author a pinch.
- peristalsis: global OMEGA, k(s) = OMEGA/flow(s), phase K(s) = integral k ds. A crest
  therefore travels at exactly the local flow speed, so "surf the crest" == "ride the
  current". Esophagus wave amp 0.9 -> 1.4 (measured): moves wallRho for Lane B.
- tube.js: chunked streaming, seams aligned to biome joins, arenas own their s-span.
- arena.js: displaced icosphere shells v0 (three's polyhedron detail is 20*(detail+1)^2,
  not 20*4^detail — 720 tris was far too coarse); fog sized to the room, since biome fog
  tuned for 100u corridors renders C's 360u acid sea as a black rectangle.
- index.js: prefers assets.texture() over get() (get returns raw JSON a shader can't eat),
  plus an explicit slug map — D's wall_smallint_a vs biome id small_intestine would miss
  silently forever under the assets-optional law.

Measured (C's real L2 + D's real pack, 1920x1080, renderer.info): 8 draws worst frame
(budget 150), 74k tris (500k), no geometry leak across a full sweep, <120ms load,
pinch ratio 3.32. fps not claimed — the screenshot pane runs tabs hidden, pausing rAF.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 08:59:19 +10:00

2.9 KiB
Raw Blame History

Lane A — progress log

2026-07-16 · Round 1 — the canal, v0

Built web/js/world/: spline + parallel-transport frames + arclength LUTs, chunked streaming tube, synthetic-scanner wall shader with vertex peristalsis, biome registry, arena shells v0, noclip flycam, headless selfcheck, dev harness. Contract per TECH.md §THE WORLD CONTRACT, drop-in for the stub.

The game boots it. /?dbg=1 (no ?stub) runs Lane A's world on C's L2_esophagus, 3600 units, hash cefc4f83, zero console errors. C's registry landing mid-round is what unblocked boot.js's pickWorld(); no shell change was needed.

Measured (dev.html, C's real L2 + D's real pack, 1920×1080, renderer.info): draws 8 worst-frame over a full-canal sweep (budget ≤150) · tris 74,420 (≤500k) · geometries 6 → 6 across a full sweep and back, no leak, 0 after dispose() · load <120 ms (<2 s) · pinch ratio L2 3.32 / L3 1.89 (>1.5). fps deliberately not claimed — the screenshot pane runs tabs hidden, which pauses rAF, and gl.finish() didn't sync; needs a real window. Determinism: node and browser agree on the hash.

Three defects the checks caught that eyeballing would not have:

  • Tube folded through itself on a wide+curvy join (turn radius 9.9 vs tube radius 17.2). Root cause: centreline amplitude authored in units. Fixed by solving amplitudes from a curvature budget, so curviness means "fraction of the pinch limit" and C can't author one.
  • Arena at 720 tris — three's polyhedron detail is 20*(detail+1)^2, not 20*4^detail. Now solved for ~3u spacing from the arena's own radius.
  • Acid sea rendered as a black rectangle — biome fog is tuned for 100u corridors, C's arena is 360u across. Arena fog is now sized to the room.

Also caught, and both would have rotted silently: the browser served a stale cached biomes.js, so the first evidence set was shot at the old wave amplitude (re-shot); and D's texture keys (wall_smallint_a) don't match my biome ids (small_intestine), which under the assets-optional law fails to procedural forever with no error (slug map added, standardisation proposed to D).

Decisions: peristalsis phase K(s) = ∫k ds with k = OMEGA/flow(s) ⇒ crest speed == local flow (so "surf the crest" == "ride the current") · esophagus wave amp 0.9 → 1.4, measured, moves wallRho for B · chunk seams align to biome joins, arenas own their span · one uv attribute, tiling derived in-shader · colorspace left matching the stub, F to rule.

Evidence → docs/shots/laneA/: round1_real_game_boot (boot.js running Lane A's world), round1_L2_textured / round1_L2_procedural_fallback (same pose, with and without D's pack — the assets-optional law), round1_L2_curve, round1_L2_wave_crest, round1_L3_arena_acid_sea.

Open for round 2: triplanar arena shells + acid plane, villi band, normal/matcap TBN, sphincter seam geometry. Full detail + per-lane asks in LANE_A_NOTES.md.