toastsim/src
monster 1ba66f0cdf M4: the cutlery drawer — and the link that makes it matter
toast -> drawer -> spread. Eight pieces settle into a real tangle; find the one
on the card, drag it up and over the rim, and whatever you're holding is what
you're spreading with.

The link, verified end to end (day 4, butter softness 0.3):

  4s in the drawer   warmth 0.78  yield 0.343  needs angle 0.36  comfortable
  50s in the drawer  warmth 0.17  yield 0.565  needs angle 0.60  cliff is 0.62

Dawdling walks you to within two hundredths of the scrape cliff. On day 7
(fridge-hard butter) it tips over into genuinely unspreadable. The drawer isn't
a timer bolted on the side — it's the thing that makes the butter hard.

Physics choices that earn their keep:
- Compound boxes, never trimeshes. A trimesh fork tangled in a trimesh fork is
  a solver nightmare and slow with it; the tine envelope is what matters anyway.
- Grab is a capped PD spring, not a fixed joint, so a snagged piece fights the
  ones lying on it and loses instead of tunnelling through them.
- The solver is fixed-stepped so a frame hitch can't detonate the pile, and the
  drawer settles offline so you open it on an existing mess.
- Clatter is synthesised from real contact-force events, velocity-scaled — a
  drawer of cutlery is a noise, and the noise has to come from the collisions.

Three fixes:
- Quaternion.toArray() returns [x,y,z,w]; Rapier wants {x,y,z,w}. Every axis
  read back undefined -> NaN in the solver -> wasm panic on the first step.
- The drag plane faced the camera, but the camera looks down into the drawer, so
  dragging to the top of the screen couldn't physically lift anything over the
  rim. It's a vertical plane now: up-screen means up.
- Cooling lived in kitchen.update(), which stops running the moment the drawer
  opens — so the toast stayed hot no matter how long you rummaged, quietly
  cancelling the entire mechanic. It's an app-level tick now.

The drawer was 4.6x3.4 and the pieces politely spread out flat. Tangling needs
crowding: 3.1x2.2, dropped down a narrow column so they land on each other.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 22:13:08 +10:00
..
core M4: the cutlery drawer — and the link that makes it matter 2026-07-16 22:13:08 +10:00
game M4: the cutlery drawer — and the link that makes it matter 2026-07-16 22:13:08 +10:00
scenes M4: the cutlery drawer — and the link that makes it matter 2026-07-16 22:13:08 +10:00
sim M3: judging — the scorecard, the judge, and a colour-space bug 2026-07-16 22:04:22 +10:00
ui M4: the cutlery drawer — and the link that makes it matter 2026-07-16 22:13:08 +10:00
dev.ts M3: judging — the scorecard, the judge, and a colour-space bug 2026-07-16 22:04:22 +10:00
main.ts M4: the cutlery drawer — and the link that makes it matter 2026-07-16 22:13:08 +10:00
style.css M4: the cutlery drawer — and the link that makes it matter 2026-07-16 22:13:08 +10:00