Extract input module

This commit is contained in:
Daddy32
2025-12-15 18:30:42 +01:00
parent 823746a588
commit fb7b6b2e6d
4 changed files with 194 additions and 152 deletions

View File

@@ -29,7 +29,8 @@ Physilinks is a browser-based physics linking game built with Matter.js. Match a
- `src/ui.js`: DOM access, HUD updates, overlays, popups, and control/selector wiring.
- `src/spawn.js`: Spawner utilities (intervals, batch/column/grid spawns), ball creation (shapes/blobs), radius scaling, and blob cleanup.
- `src/goals.js`: Goal computation and messaging (timer/score/clear/color goals, milestone announcements, intro message).
- `src/main.js`: Physics setup, state machine, chain interaction, scene application, and pause/restart logic; delegates spawn duties to `src/spawn.js` and goal handling to `src/goals.js`.
- `src/input.js`: Pointer/touch handling, drag constraints, chain linking/undo flow, and input event wiring.
- `src/main.js`: Physics setup, state machine, chain interaction, scene application, and pause/restart logic; delegates spawn duties to `src/spawn.js`, goal handling to `src/goals.js`, and input/chain interactions to `src/input.js`.
## Development quick start
- No build step. Open `index.html` directly in the browser.