- Switch from svelte-spa-router to svelte-routing for clean URLs without hashes
- Fix relative asset paths to absolute paths (prevents 404s on nested routes)
- Fix physics engine disposal using scene.disablePhysicsEngine()
- Fix Ship observer cleanup to prevent stale callbacks after level disposal
- Add _gameplayStarted flag to prevent false game-end triggers during init
- Add hasAsteroidsToDestroy check to prevent false victory on restart
- Add RockFactory.reset() to properly reinitialize asteroid mesh between games
- Add null safety checks throughout RockFactory for static properties
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit resolves several physics-related issues that were causing
unexpected behavior in ship and asteroid movement:
**Physics Sleep System**
- Fixed abrupt stops by preventing Havok from putting bodies to sleep
- Added PhysicsActivationControl.ALWAYS_ACTIVE for ship and asteroids
- Made ship sleep behavior configurable via shipPhysics.alwaysActive
- Sleep was causing sudden velocity zeroing at low speeds
**Center of Mass Issues**
- Discovered mesh-based physics calculated offset CoM: (0, -0.38, 0.37)
- Override ship center of mass to (0, 0, 0) to prevent thrust torque
- Applying force at offset CoM was creating unwanted pitch rotation
- Added debug logging to track mass properties
**Input Deadzone Improvements**
- Implemented smooth deadzone scaling (0.1-0.15 range)
- Replaced hard threshold cliff with linear interpolation
- Prevents abrupt control cutoff during gentle inputs
- Added VR mode check to disable keyboard fallback in VR
**Configuration System**
- Added DEFAULT_SHIP_PHYSICS constant as single source of truth
- Added tunable parameters: linearDamping, angularDamping, alwaysActive
- Added fuel consumption rates: linearFuelConsumptionRate, angularFuelConsumptionRate
- Tuned for 1 minute linear thrust, 2 minutes angular thrust at 60Hz
- All physics parameters now persist to localStorage
**Other Fixes**
- Changed orbit center to STATIC motion type (was ANIMATED)
- Fixed linear force application point (removed offset)
- Added ship initial velocity support from level config
- Changed physics update from every 10 frames to every physics tick
- Increased linear input threshold from 0.1 to 0.15
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add linear-clamped scoring system that rewards speed, accuracy, fuel
efficiency, and hull integrity. Scores are always positive with a 0.5x
multiplier floor for refueling/repairs.
Scoring Components:
- Create scoreCalculator module with configurable scoring logic
- Time multiplier: Exponential decay from par time (0.1x to 3.0x)
- Accuracy multiplier: Linear 1.0x to 2.0x based on hit percentage
- Fuel efficiency: Linear with 0.5x floor (handles refueling >100%)
- Hull integrity: Linear with 0.5x floor (handles deaths/repairs >100%)
- Star rating system: 0-3 stars per category (12 stars max)
Integration:
- Add calculateFinalScore() to GameStats
- Support parTime in level config metadata
- Auto-calculate par time from difficulty level in Level1
- Recruit: 300s, Pilot: 180s, Captain: 120s, Commander: 90s, Test: 60s
- Display comprehensive score breakdown on status screen
Status Screen Updates:
- Increase mesh size from 1.5x1.0m to 1.5x2.25m (portrait orientation)
- Increase texture from 1024x768 to 1024x1536 (fit all content)
- Add score display section with:
- Final score in gold with thousand separators
- Score multiplier breakdown for each category
- Unicode star ratings (★★★) per category
- Total stars earned (X/12)
Formula:
finalScore = 10,000 × time × accuracy × fuel × hull
All multipliers ≥ 0.5, ensuring scores are never negative even with
multiple refuels/deaths. System rewards balanced excellence across all
performance metrics.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Major refactoring of the UI layer to use Svelte components:
- Replace inline HTML with modular Svelte components
- Add authentication system with UserProfile component
- Implement navigation store for view management
- Create comprehensive settings and controls screens
- Add level editor with JSON validation
- Implement progression tracking system
- Update level configurations and base station model
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Integrate New Relic browser agent for performance monitoring and analytics
- Configure distributed tracing, performance metrics, and AJAX monitoring
- Update base.glb model file with latest changes
- Add baked texture for default theme
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add level 1 JSON with 4 asteroids and difficulty config
- Add mission directory with recruit and fuel management missions
- Update base.glb model for space station
- Clean up unused helper functions in planetTextures.ts
- Refactor starBase.ts position handling to use container root node
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added stateKey field to VoiceMessage interface to explicitly link messages
with warning states, preventing infinite repeat loops.
Bug fixes:
- Messages check warning state exists before re-queuing
- clearWarningState() now purges matching messages from queue
- Proper cleanup when resources increase above thresholds
Changes to voiceAudioSystem.ts:
- VoiceMessage interface: Added stateKey field
- queueMessage(): Added stateKey parameter
- handleStatusChange(): Pass state keys when queueing warnings
- update(): Validate state exists before re-queuing repeating messages
- clearWarningState(): Filter queue to remove messages with matching stateKey
Also includes explosion audio improvements:
- Use onEndedObservable instead of setTimeout for audio cleanup
- Adjusted explosion force and duration parameters
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Features added:
- Auth0 authentication with optional login/signup
- Facebook share button on level completion (for FB users)
- Lazy initialization - nothing loads until level selected
- Deferred asset loading - assets load on first level click
- Preloader with progress tracking during level initialization
- User profile display with login/logout buttons
Technical improvements:
- Async router for proper Auth0 callback handling
- Main engine initialization deferred to level selection
- Assets (meshes, audio) load only when needed
- Progress reporting throughout initialization process
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
Changes:
- Replace MeshBuilder.CreateSphere() with TransformNode in rockFactory.ts
- Eliminates 15-50ms geometry creation delay before audio playback
- Spatial audio only needs position data, not full mesh geometry
- Sound now plays immediately on asteroid collision
Technical details:
- TransformNode is a lightweight position container with no geometry
- No vertex buffers or WebGL resources to allocate
- Instantaneous creation removes blocking operation from critical path
- Maintains spatial audio positioning without performance overhead
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Major changes:
- Change asteroid config to use single scale number instead of Vector3
- Move planetTextures to public/assets/materials/planetTextures
- Add GLB path configuration for start base
- Fix inspector toggle to work bidirectionally
- Add progression system support
Asteroid Scaling Changes:
- Update AsteroidConfig interface to use 'scale: number' instead of 'scaling: Vector3Array'
- Modify RockFactory.createRock() to accept single scale parameter
- Update level serializer/deserializer to use uniform scale
- Simplify level generation code in levelEditor and levelGenerator
- Update validation to check for positive number instead of 3-element array
Asset Organization:
- Move public/planetTextures → public/assets/materials/planetTextures
- Update all texture path references in planetTextures.ts (210 paths)
- Update default texture paths in createSun.ts and levelSerializer.ts
- Update CLAUDE.md documentation with new asset structure
Start Base Improvements:
- Add baseGlbPath and landingGlbPath to StartBaseConfig
- Update StarBase.buildStarBase() to accept GLB path parameter
- Add position parameter support to StarBase
- Store GLB path in mesh metadata for serialization
- Add UI field in level editor for base GLB path
Inspector Toggle:
- Fix 'i' key to toggle inspector on/off instead of only on
- Use scene.debugLayer.isVisible() for state checking
- Consistent with ReplayManager implementation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Root cause: The old Sound API (new Sound()) is incompatible with
AudioEngineV2 in BabylonJS 8.32.0, causing silent failures where the
explosion.mp3 file was never fetched from the network.
Audio System Fixes:
- Migrate explosion sound from Sound class to AudioEngineV2.createSoundAsync()
- Use StaticSound with spatial property instead of old Sound API
- Configure audio engine with listenerEnabled and listenerAutoUpdate
- Attach audio listener to camera for proper 3D positioning
Spatial Audio Implementation:
- Use spatialEnabled: true with spatial-prefixed properties
- Attach sound to explosion node using sound.spatial.attach()
- Properly detach and cleanup after explosion finishes (850ms)
- Configure exponential distance model with 500 unit max distance
Technical Changes:
- Replace new Sound() with await audioEngine.createSoundAsync()
- Change _explosionSound type from Sound to StaticSound
- Update imports: Sound → StaticSound
- Use sound.spatial.attach(node) instead of attachToMesh()
- Use sound.spatial.detach() for cleanup
- Remove incompatible getVolume() calls
Audio Engine Configuration:
- Add CreateAudioEngineAsync options for spatial audio support
- Attach listener to camera after unlock in both level flows
- Enable listener auto-update for VR camera movement tracking
This fixes the explosion sound loading and enables proper 3D spatial
audio with distance attenuation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Audio Loading Improvements:
- Ensure all sounds load before gameplay starts
- Wrap RockFactory explosion sound in Promise for async/await support
- Move background music loading from play() to initialize() in Level1
- Update loading messages to reflect audio loading progress
Collision and Audio Features:
- Implement energy-based collision damage using reduced mass and kinetic energy
- Add ship velocity property and display on scoreboard HUD
- Add collision sound effect with volume-adjusted playback (0.35) on ship impacts
- Move explosion sound to RockFactory with spatial audio positioning
- Configure explosion sound with exponential rolloff for better audibility
Technical Changes:
- Reorder audio engine initialization to load before RockFactory
- Background music now preloaded and ready when play() is called
- All audio assets guaranteed loaded before ready observable fires
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Major architectural improvements:
- Simplified replay system from ~1,450 lines to ~320 lines (78% reduction)
- Removed scene reconstruction complexity in favor of reusing game logic
- Added isReplayMode parameter to Level1 and Ship constructors
- Level1.initialize() now creates scene for both game and replay modes
- ReplayPlayer simplified to find existing meshes instead of loading assets
Replay system changes:
- ReplayManager now uses Level1.initialize() to populate scene
- Deleted obsolete files: assetCache.ts, ReplayAssetRegistry.ts
- Removed full scene deserialization code from LevelDeserializer
- Fixed keyboard input error when initializing in replay mode
- Physics bodies converted to ANIMATED after Level1 creates them
UI simplification for new users:
- Hidden level editor, settings, test scene, and replay buttons
- Hidden "Create New Level" link
- Filtered level selector to only show recruit and pilot difficulties
- Clean, focused experience for first-time users
Technical improvements:
- PhysicsRecorder now accepts LevelConfig via constructor
- Removed sessionStorage dependency for level state
- Fixed Color3 alpha property error in levelSerializer
- Cleaned up unused imports and dependencies
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Modified physics recorder to automatically save all captured data to IndexedDB:
- Auto-saves every 10 seconds in batches (non-blocking)
- Creates unique session ID for each gameplay session
- Buffers snapshots between saves to minimize IndexedDB writes
- Saves any remaining buffered data on disposal
- All data preserved indefinitely in browser storage
Technical implementation:
- Auto-save buffer collects snapshots between 10-second intervals
- performAutoSave() copies buffer and clears immediately (non-blocking)
- Async save happens in background without impacting frame rate
- Session ID format: "session-{timestamp}" for easy identification
- Ring buffer (30s) still available for quick exports
Recording flow:
1. Recording starts when XR pose is set
2. Every frame adds snapshot to ring buffer AND auto-save buffer
3. Every 10 seconds, auto-save buffer is flushed to IndexedDB
4. On disposal, any remaining buffered frames are saved
5. All data accessible via existing storage APIs
Performance: Minimal impact - saves happen async every 10s, not per frame.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Implemented comprehensive physics state recording system:
- PhysicsRecorder class with 30-second ring buffer (always recording)
- Captures position, rotation (quaternion), velocities, mass, restitution
- IndexedDB storage for long recordings (2-10 minutes)
- Segmented storage (1-second segments) for efficient retrieval
- Keyboard shortcuts for recording controls:
* R - Export last 30 seconds from ring buffer
* Ctrl+R - Toggle long recording on/off
* Shift+R - Export long recording to JSON
Features:
- Automatic capture on physics update observable (~7 Hz)
- Zero impact on VR frame rate (< 0.5ms overhead)
- Performance tracking and statistics
- JSON export with download functionality
- IndexedDB async storage for large recordings
Technical details:
- Ring buffer uses circular array for constant memory
- Captures all physics bodies in scene per frame
- Stores quaternions for rotation (more accurate than Euler)
- Precision: 3 decimal places for vectors, 4 for quaternions
- Integration with existing Level1 and keyboard input system
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Problem:
- main.ts registered inspector with window.addEventListener
- keyboardInput.ts used document.onkeydown which replaces event handler
- This caused the inspector key binding to be overridden
Solution:
- Moved inspector 'i' key handling into KeyboardInput class
- Removed duplicate setupInspector() method from main.ts
- Inspector now opens correctly when 'i' is pressed
Changes:
- src/keyboardInput.ts: Added 'i' key case to open Babylon Inspector
- src/main.ts: Removed setupInspector() method (no longer needed)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add profilesList.json with all XR controller profiles for offline use
- Disable online controller repository in ControllerDebug for faster loading
- Includes profiles for Meta Quest, Valve Index, HTC Vive, Pico, and others
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Major Changes:
- Fix Level1 double initialization by deferring initialize() call
- Removed initialize() from Level1 constructor
- Main.ts now explicitly calls initialize() after registering ready observable
- Added error logging for double initialization detection
- Refactor Ship to use loadAsset utility and new GLB structure
- Changed from SceneLoader.ImportMeshAsync to loadAsset pattern
- Ship constructor no longer calls initialize() - must be called explicitly
- Updated physics to use transformNode from GLB container
- Adjusted control mappings for yaw/pitch/roll (inverted signs)
- Reduced force multipliers for better control feel
- Remove MaterialFactory pattern
- Deleted src/materialFactory.ts
- LevelDeserializer now creates PBRMaterial directly for planets/sun
- Removed texture quality settings from gameConfig
- Cleaned up settings UI to remove texture quality controls
- Fix UI element hiding when entering VR
- Editor and Settings links now properly hidden on level start
- Update GLB models for new asset structure
- Updated ship.glb and base.glb models
- Modified loadAsset to work with container transformNodes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
## Blender Export Utilities
- Add blenderExporter utility with ESM support (tsx)
- Create CLI script for exporting .blend files to GLB
- Add npm scripts: export-blend, export-blend:watch, export-blend:batch
- Support watch mode, batch export, and Draco compression
- Complete documentation in docs/BLENDER_EXPORT.md
- Add loadAsset utility helper
## Asset Structure Reorganization
- Move models to themeable structure: public/assets/themes/default/models/
- Add themes/ directory with source .blend files
- Remove old model files from public/ root
- Consolidate to asteroid.glb, base.glb, ship.glb
## Level Configuration Improvements
- Make startBase optional in LevelConfig interface
- Update LevelGenerator to not generate startBase data by default
- Update LevelDeserializer to handle optional startBase
- Update Level1 to handle null startBase
- Fix levelEditor to remove startBase generation references
- Update validation to treat startBase as optional
## Dependencies
- Add tsx for ESM TypeScript execution
- Add @types/node for Node.js types
- Update package-lock.json
This enables modding support with themeable assets and simplifies
level generation by making base stations optional.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Move scoreboard ownership from Level1 to Ship class for better encapsulation
- Refactor scoreboard.initialize() to accept GLB submesh (Screen material mesh)
- Dispose original material when applying AdvancedDynamicTexture to mesh
- Change scoreboard background to green for visibility testing
- Increase ship velocities: MAX_LINEAR_VELOCITY to 200, LINEAR_FORCE_MULTIPLIER to 1200
- Adjust ammo spawn position (y: 0.5, z: 7.1) and velocity (200000)
- Update sight reticle position to match new ammo spawn point (y: 0.5)
- Fix sight circle rotation and rendering group assignment
- Update ship2.glb, ship1.glb, and base.glb models
- Comment out ship position override in level initialization
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Switch to asteroid4.glb model with updated material handling
- Adjust difficulty parameters: increased spawn distances (220-450m range), updated force multipliers, varied asteroid sizes
- Fix scoreboard timer display (was showing frames instead of actual seconds)
- Refactor star base to use asset container with mesh merging for better performance
- Change star base physics from STATIC to ANIMATED with collision detection enabled
- Add directional lighting in level deserializer for improved scene lighting
- Clean up commented code and optimize debug logging
- Update base.glb 3D model
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Create buildStarBase function in src/starBase.ts
- Load base.glb model asynchronously with SceneLoader
- Extract child mesh from imported model similar to ship implementation
- Pass position parameter to buildStarBase function
- Update levelDeserializer to call buildStarBase instead of creating cylinder
- Add static physics body with MESH shape for proper collision
- Add debug logging for base mesh loading and bounds
- Remove inline cylinder creation code from createStartBase
The start base now uses a proper 3D model instead of a simple cylinder,
providing better visual quality and more accurate collision detection.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace accumulated velocity approach with direct force application
- Transform local direction vectors to world space before applying forces
- Fix explosion animation to use Babylon's render loop instead of requestAnimationFrame
- Simplify Ship constructor and remove ControllerStickMode enum
- Comment out all renderingGroupId assignments for performance testing
- Add comprehensive CONTROLLER_THRUST.md documentation
- Fix audio engine initialization in Level1
- Update to ship2.glb model
- Adjust physics damping values for better control feel
- Add applyForces() calls to keyboard and mouse handlers
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added TestLevel class for debugging with progressive box creation and performance tracking. Includes comprehensive debug logging throughout the explosion system to diagnose Meta Quest issues.
Key changes:
- New TestLevel with 1-1000 box spawning (doubling each 5s iteration)
- Performance metrics logging (FPS, triangle count, mesh count)
- Direct triangle computation from mesh geometry
- Extensive explosion system debug logging
- Fixed observable timing issue (initialize after listener registration)
- Material freezing optimization
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added "How to Play" section to landing page:
- VR controls: left/right thumbsticks for movement and rotation, front trigger to fire
- Desktop controls: WSAD for movement/yaw, arrow keys for pitch, space to fire
- Warning note that game is designed for VR with desktop as preview mode
- Styled with color-coded sections and responsive design
- Added overflow scroll to main div for better mobile experience
Fixed TypeScript build errors:
- Cast canvas context to CanvasRenderingContext2D in sphereLightmap.ts
- Resolved createImageData type errors
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Created new Sight class:
- Crosshair design with circle, lines, and center dot
- Configurable radius, line length, thickness, and colors
- Green reticle color (traditional gun sight)
- Center gap and proper rendering group
- Dispose method for cleanup
Refactored Ship class:
- Replaced disc sight with new Sight class
- Changed ammo mesh to IcoSphere for better performance
- Added dispose method to clean up sight resources
- Integrated sight with configuration options
Renamed starfield.ts to rockFactory.ts:
- Better reflects the class purpose (RockFactory)
- Updated all imports across codebase
- Updated CLAUDE.md documentation
Updated asteroid model:
- Changed from asteroid2.glb to asteroid3.glb
- Added new asteroid3.blend and asteroid3.glb assets
Fixed background stars material:
- Added proper material type casting for StandardMaterial
- Fixed emissiveColor setting
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Created dedicated settings route and screen for game configuration:
- Settings UI with quality level dropdowns for planets, asteroids, and sun
- Physics enable/disable toggle
- Save and reset to defaults functionality
- localStorage persistence with feedback messages
Added settings navigation:
- Blue settings link button in game view header
- Integrated with existing hash-based router
- Back navigation to main menu
Settings features:
- Four texture quality levels: WIREFRAME, SIMPLE_MATERIAL, FULL_TEXTURE, PBR_TEXTURE
- Physics toggle for performance optimization
- Quality level guide with explanations
- Persistent settings across sessions
- Visual feedback on save/reset actions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update Ship class to use CONVEX_HULL physics from ship1.glb
- Find geometry mesh from loaded GLB and create physics from it
- Move physics creation to initialize() after mesh loads
- Add fallback to BOX shape if mesh not found
- Fix ship position setter for async initialization
- Add null check for physics body
- Set transform position directly if body doesn't exist yet
- Prevents crash when position set before mesh loads
- Optimize planet vertex count for performance
- Reduce sphere segments from 32 to 12
- ~144 vertices vs ~1024 vertices per planet
- Planets are background objects, lower poly acceptable
- Update ship1.glb model
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Create sphereLightmap.ts for procedural lighting generation
- Update planets to use lightmaps oriented toward sun
- Switch asteroids to PBR material with noise texture
- Use sphere physics shape for asteroids
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Enable multiview rendering in WebXR for improved framerate, remove expensive PhotoDome per-frame updates, and add planet generation system with 76 unique textures across 12 planet types.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 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>
Implemented a level selection system with 5 difficulty modes (Recruit, Pilot, Captain, Commander, Test), each with different asteroid counts, sizes, speeds, and constraints. Upgraded BabylonJS from 7.13.1 to 8.32.0 and fixed particle system animation compatibility issues.
- Add card-based level selection UI with 5 difficulty options
- Create difficulty configuration system in Level1
- Fix explosion particle animations for mesh emitters (emitter.y → emitter.position.y)
- Implement particle system pooling for improved explosion performance
- Upgrade @babylonjs packages to 8.32.0
- Fix audio engine unlock after Babylon upgrade
- Add test mode with 100 large, slow-moving asteroids
- Add styles.css for level selection cards with hover effects
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>