Removes internal process references so the repo is presentable to an outside audience: dropped the internal build-retrospective doc (process log with internal terms, not useful to an outside reader), and reworded remaining internal references in code comments and module docs (agents.md cards, architecture.md, MODULES.md, index.html, package.json) to generic descriptions of what changed and when, with no behavior change -- full 47/47 suite re-run green after the scrub, every edit verified comment/doc-only via diff. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1.4 KiB
1.4 KiB
js/physics/step/ — agents.md
Part of the modularization pass. Module map: MODULES.md; runtime model: architecture.md.
Installs into P: step, stepPhysics, spendBird. The physics hub.
step(g, dt)= time advance + stepPhysics + end-state check + camera.stepPhysicsis the integration core: gravity, air drag, bird/bird-block/bird-enemy/ block-block contacts, crush, settle bookkeeping.- Because it reaches into nearly every unit, it is installed AFTER aim/damage and
BEFORE nothing — but all of its callees must exist in
Pby the timestepruns (they do, because install order is load order). Keep it that way. spendBirdretires a bird that is GONE (aged out / off the island). S-5 (added 2026-09-29) split the settle branch: a bird that settles while ANOTHER bird is in play becomeslanded— a live body integrated every frame instepPhysics(real gravity, no lifetime timer) that falls when its support breaks, chain-damages boards, and can kill enemies. The LAST bird still spends (win/lose unchanged — keep it that way; the sim win/lose test is the gate). Landed birds are cleared when the level ends (insidestep's won/lost branch).advanceToNextBirdis the shared "next bird onto the sling" path used by both the spent and landed transitions.- Determinism invariant: no Math.random, no Date, no DOM. Tests call this directly at dt=1/120.