Commit Graph

6 Commits

Author SHA1 Message Date
453e26e57b Clarify WebGPU warning message to mention engine type
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 06:55:48 -06:00
53388c8193 Add optional WebGPU engine support via ?webGPU=true query parameter
Allows launching the game with WebGPU rendering by passing ?webGPU=true in the URL.
Defaults to WebGL engine when the parameter is absent. Logs a warning that WebXR/VR
is not yet supported with WebGPU.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 06:39:24 -06:00
208d735ef4 Add background music selection and update game assets
Add configurable background music per level with song selector in the
level editor General tab. Update ship model, add base3 model, add
song2/song3 audio tracks, and clean up level config formatting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 06:13:37 -06:00
b46f44e32d Performance fixes and debug features
All checks were successful
Build / build (push) Successful in 1m45s
- Fix duplicate render loops causing 50% FPS drop (70→40)
  - Add stopRenderLoop() before runRenderLoop() in level1.ts and levelSelectedHandler.ts
- Add ?loglevel=debug|info|warn|error query parameter
- Add Y button to toggle inspector in XR
- Throttle scoreboard updates to every 10 frames
- Throttle game-end condition checks to every 30 frames
- Remove per-frame logging from explosion animations
- Reduce background stars from 5000 to 2500
- Freeze asteroid material after loading
- Reduce physics substeps from 5 to 2
- Disable autoClear for Quest 2 performance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 07:58:15 -06:00
cf3a74ff0b Fix scene doubling on reload and add dynamic inspector import
All checks were successful
Build / build (push) Successful in 1m45s
- Dispose old scene before creating new one (cleans up physics)
- Stop existing render loop before starting new one
- Dynamically import @babylonjs/inspector on 'i' key press

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 06:06:39 -06:00
e8ac3a8f0a Refactor main.ts to meet coding standards (<100 lines)
All checks were successful
Build / build (push) Successful in 1m7s
- Extract cleanup logic to src/core/cleanup.ts
- Extract XR setup to src/core/xrSetup.ts
- Extract scene/physics/audio setup to src/core/sceneSetup.ts
- Remove unused GameState enum and _gameState field
- main.ts reduced from 192 to 91 lines
- All methods now under 20 lines

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 05:01:28 -06:00