space-game/public
Michael Mainguy 57ffe8f689 Migrate to AudioEngineV2 and fix Meta Quest 2 controller detection
- Upgrade audio system from deprecated Sound API to AudioEngineV2
  - Use CreateAudioEngineAsync() for audio engine initialization
  - Replace new Sound() with createSoundAsync() throughout codebase
  - Track sound playing state manually (StaticSound lacks isPlaying)
  - Use volume property instead of setVolume() method
  - Use stop() instead of pause() for proper StaticSound lifecycle

- Fix controller detection for Meta Quest 2
  - Check for already-connected controllers after entering XR mode
  - Fixes issue where Quest 2 controllers only become available after enterXRAsync()
  - Maintains backward compatibility with WebXR emulator

- Improve initialization performance
  - Move RockFactory.init() to main initialization (before level select)
  - Pre-load asteroid meshes and explosion particle systems on startup
  - Level initialization now only creates asteroids, not resources

- Refactor level initialization flow
  - Level creation now happens before entering XR mode
  - Add level ready observable to track initialization completion
  - Show loading messages during asteroid creation
  - Extract loading message logic to separate module

- Add audio unlock on user interaction (button click)
- Make play() methods async to support AudioEngineV2
- Pass AudioEngineV2 instance to Ship and Level1 constructors

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 13:59:48 -05:00
..
systems Add difficulty levels and upgrade BabylonJS 2025-10-17 09:05:18 -05:00
8192.webp Initial Commit 2025-02-15 11:19:24 -06:00
arrow.stl Initial Commit 2025-02-15 11:19:24 -06:00
asteroid2.glb changed game dynamics. 2025-10-13 17:16:50 -05:00
asteroid.glb Initial Commit 2025-02-15 11:19:24 -06:00
background.mp3 Initial Commit 2025-02-15 11:19:24 -06:00
cockpit2.glb Initial Commit 2025-02-15 11:19:24 -06:00
cockpit3.glb Initial Commit 2025-02-15 11:19:24 -06:00
cockpit4.glb changed game dynamics. 2025-10-13 17:16:50 -05:00
cockpit.glb Initial Commit 2025-02-15 11:19:24 -06:00
flare.png Initial Commit 2025-02-15 11:19:24 -06:00
ship1.stl Initial Commit 2025-02-15 11:19:24 -06:00
shot2.mp3 Started cleaning up audio, rendering artifacts. 2025-02-16 16:44:18 -06:00
shot.mp3 Started cleaning up audio, rendering artifacts. 2025-02-16 16:44:18 -06:00
song1.mp3 Migrate to AudioEngineV2 and fix Meta Quest 2 controller detection 2025-10-17 13:59:48 -05:00
styles.css changed game dynamics. 2025-02-17 16:51:06 -06:00
thrust2.mp3 Initial Commit 2025-02-15 11:19:24 -06:00
thrust3.mp3 Started cleaning up audio, rendering artifacts. 2025-02-16 16:44:18 -06:00
thrust4.mp3 Started cleaning up audio, rendering artifacts. 2025-02-16 16:44:18 -06:00
thrust5.mp3 Started cleaning up audio, rendering artifacts. 2025-02-16 16:44:18 -06:00
thrust.mp3 Initial Commit 2025-02-15 11:19:24 -06:00
thust2.mp3 Initial Commit 2025-02-15 11:19:24 -06:00
yehrat.mp3 Initial Commit 2025-02-15 11:19:24 -06:00