18 lines
940 B
Markdown
18 lines
940 B
Markdown
|
|
# js/app/ — agents.md
|
||
|
|
RC-375D84 S-2. Module map: `MODULES.md`; runtime model: `architecture.md`.
|
||
|
|
|
||
|
|
Self-contained module — the page. Owns DOM, input, screens and the main loop.
|
||
|
|
|
||
|
|
- Reads `window.ISLE_CORE`, `ISLE_LEVELS`, `ISLE_RENDERER`, `ISLE_AUDIO`; writes
|
||
|
|
`window.ISLE_PAGE = { getState }` for tests.
|
||
|
|
- Fixed-timestep loop: rAF accumulator at 1/120 s feeding `ISLE_CORE.step`;
|
||
|
|
`pumpFrames` in the page test drives it.
|
||
|
|
- Pointer model: mousedown near the sling arms aim, mousemove drags, mouseup
|
||
|
|
calls `ISLE_CORE.launch` with `aimVector(...)`; tap mid-flight =
|
||
|
|
`triggerAbility`. The direction test (bug #15) asserts pulling back launches
|
||
|
|
TOWARD the fort.
|
||
|
|
- Screens: start / level-select / pause / win / lose; HUD (level, birds, score,
|
||
|
|
pause, mute). Level select unlocks by localStorage progress.
|
||
|
|
- Keep DOM touches in this file only — physics/levels/audio/render must stay
|
||
|
|
DOM-free so the headless suites keep working.
|