guts/web/js/world
jing a99f733452 [lane A] MODELBEAST dresses the molecules: 5 matcaps, and the canal picks space-filling
The right axis wasn't "generate or don't" — it was WHICH HALF. Geometry stays
procedural because a molecule's shape is already known exactly. **Material is
exactly a generation problem**, and it's the whole difference between a textbook
diagram and a game object. So MODELBEAST made the materials.

5 greyscale matcaps, flux_local, 69 seconds, $0.00, 68 KB total:
  mol_glass (O,N) — the big win: oxygen is a red glass marble with internal glow
  mol_matte (C)   — graphite soot; carbon reads as the scaffold it is
  mol_chrome (Co) — B12's cobalt is now a chrome bearing in a cage
  mol_molten (P)  — ATP's phosphate tail is incandescent AND pulses (uTime, free)
  mol_pearl (H)   — satin white; hydrogens stop shouting

The trick is Lane D's own law applied to spheres: author the LUMINANCE, tint
in-shader. derive_maps already greyscales every matcap, so one glass ball serves
oxygen AND nitrogen at their own CPK hues — 5 balls dress the whole periodic
table we care about. They pack into one strip atlas indexed per-vertex by aMat,
so **a molecule is still exactly 1 draw call** however many materials it's made
of (7 molecules = 7 draws, unchanged). ?matcap=0 falls back to the built-in
fake-lit path: the assets-optional law holds.

SPACE-FILLING WINS FOR PICKUPS, and the canal decided it, not me. New
`repr: 'space-filling'` draws every atom at its real van der Waals radius with no
sticks. A/B'd at real pickup size against the real L2 wall, same camera:
ball-and-stick goes spindly and dissolves; the solid blob holds its silhouette —
and it's CHEAPER (21k vs 26k tris, no bond cylinders). Recommendation to B:
space-filling in flight, ball-stick for hero/UI/collect close-ups where the
chemistry is worth reading. Evidence: round2_molecule_materials.png (3-way).

Two defects found by rendering it, both mine, both fixed:
- Tint x luminance darkens TWICE: CPK carbon is 0.4 and a matte ball averages
  0.5, so soot x soot vanished — the first pass sank glucose, caffeine and the
  cobalt into the background. Floored the matcap at 0.22, the same floor the
  fallback's key light always had.
- The molten matcap was my own bad prompt: I asked for an "incandescent white hot
  CORE" and got exactly that — a black ball with a hot spot, so phosphorus lost
  its orange. Re-rolled for the whole sphere to glow (attempt 2 of the <=2
  PIPELINE allows). Lesson for the kit, next to the organ/tissue one: a matcap is
  a LUMINANCE LOOKUP, so a dark-dominant ball makes a dark-dominant object.

Also corrected the doc's own framing — v1 said "I'm authorised to burn GPU and
I'm not going to", which was the wrong axis, not just the wrong tone.

qa GREEN; 16/16 texture provenance verified (synced the FIXED batch json up
first this time, so the box couldn't clobber it on the way back).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 21:31:24 +10:00
..
_fixture.js [lane A] The swept room + the acid sea, built — and it corrected me four times 2026-07-16 18:04:16 +10:00
acid.js [lane A] The swept room + the acid sea, built — and it corrected me four times 2026-07-16 18:04:16 +10:00
arena.js [lane A] The swept room + the acid sea, built — and it corrected me four times 2026-07-16 18:04:16 +10:00
biomes.js [lane A] Round 1: the canal v0 — spline, streaming tube, scanner wall, arenas 2026-07-16 08:59:19 +10:00
flycam.js [lane A] Round 1: the canal v0 — spline, streaming tube, scanner wall, arenas 2026-07-16 08:59:19 +10:00
index.js [lane A] The swept room + the acid sea, built — and it corrected me four times 2026-07-16 18:04:16 +10:00
molecule.js [lane A] MODELBEAST dresses the molecules: 5 matcaps, and the canal picks space-filling 2026-07-16 21:31:24 +10:00
spline.js [lane A] The swept room + the acid sea, built — and it corrected me four times 2026-07-16 18:04:16 +10:00
tube.js [lane A] The swept room + the acid sea, built — and it corrected me four times 2026-07-16 18:04:16 +10:00
wall_material.js [lane A] The swept room + the acid sea, built — and it corrected me four times 2026-07-16 18:04:16 +10:00