space-game/src
Michael Mainguy ff8d69b6ec
All checks were successful
Build / build (push) Successful in 1m32s
Add VR controller remapping configuration system
Implement comprehensive controller remapping UI that allows users to customize
VR controller button and stick mappings with per-axis granularity and inversion
controls. Configuration persists to localStorage and applies on level start.

## Features
- Full-page controller remapping UI at #/controls
- Per-axis stick mapping (4 dropdowns: leftX, leftY, rightX, rightY)
- Individual axis inversion toggles (8 total invert options)
- Button remapping (6 buttons: trigger, A, B, X, Y, squeeze)
- Available actions: yaw, pitch, roll, forward thrust, camera, status screen
- Configuration validation with warnings for duplicates/missing controls
- Preview/test functionality to review current mapping
- Reset to default option
- localStorage persistence with backward compatibility

## Implementation
- ControllerMappingConfig singleton manages configuration and validation
- ControlsScreen handles UI logic and form manipulation
- ControllerInput applies mapping by translating raw input to actions
- Actions mapped back to virtual stick positions for ShipPhysics
- No changes needed to ShipPhysics - receives correctly mapped values

## User Flow
1. Navigate to Controls via header menu
2. Select action for each stick axis (yaw/pitch/roll/forward/none)
3. Toggle invert checkboxes as needed
4. Assign button actions (fire/camera/status/none)
5. Save configuration
6. Changes apply when starting new level

## Technical Details
- Storage key: 'space-game-controller-mapping'
- Raw stick values stored, mapping applied in getInputState()
- Supports future actions without code changes
- Validation ensures critical controls (fire, forward) are mapped

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 08:11:04 -06:00
..
analytics Add analytics abstraction layer with intelligent batching 2025-11-12 16:22:28 -06:00
core Implement hybrid level storage system with JSON-based defaults and configurable orbit constraints 2025-11-11 18:40:01 -06:00
environment Implement hybrid level storage system with JSON-based defaults and configurable orbit constraints 2025-11-11 18:40:01 -06:00
game Add analytics abstraction layer with intelligent batching 2025-11-12 16:22:28 -06:00
levels Implement trigger-based mission brief dismissal for VR gameplay 2025-11-21 07:44:46 -06:00
replay Restructure codebase into logical subdirectories 2025-11-11 12:53:18 -06:00
services Restructure codebase into logical subdirectories 2025-11-11 12:53:18 -06:00
ship Add VR controller remapping configuration system 2025-11-21 08:11:04 -06:00
ui Add VR controller remapping configuration system 2025-11-21 08:11:04 -06:00
utils Restructure codebase into logical subdirectories 2025-11-11 12:53:18 -06:00
main.ts Add VR controller remapping configuration system 2025-11-21 08:11:04 -06:00
vite-env.d.ts Add Discord widget integration with dynamic script loading 2025-11-10 17:53:27 -06:00