Refactor scenes into separate files

This commit is contained in:
Daddy32
2025-12-13 14:03:52 +01:00
parent a4fdcdb35f
commit 357922510a
7 changed files with 417 additions and 2 deletions

View File

@@ -23,7 +23,7 @@ Physilinks is a browser-based physics linking game built with Matter.js. Match a
## File structure
- `index.html`: Shell layout and HUD overlays; loads Matter.js plus game scripts.
- `styles.css`: Styling for canvas, HUD, overlays, and score popups.
- `scenes.js`: Scene presets and per-scene static body factories.
- `scenes/`: Scene presets split per file (`scene-*.js`) plus `index.js` that registers them to `window.PhysilinksScenes`.
- `ui.js`: DOM access, HUD updates, overlays, popups, and control/selector wiring.
- `main.js`: Physics setup, state machine, chain interaction, spawning, scene application, and pause/restart logic.