Go to file
Michael Mainguy 0988805652
All checks were successful
Build / build (push) Successful in 1m14s
Make ship physics constants configurable via GameConfig with UI
Implemented Option 5: Integrate ship physics constants into centralized GameConfig

Changes to gameConfig.ts:
- Added shipPhysics object with 4 tunable parameters:
  - maxLinearVelocity (default: 200)
  - maxAngularVelocity (default: 1.4)
  - linearForceMultiplier (default: 800)
  - angularForceMultiplier (default: 15)
- Updated save() to persist shipPhysics to localStorage
- Updated loadFromStorage() to load shipPhysics with fallback defaults
- Updated reset() to restore shipPhysics defaults

Changes to shipPhysics.ts:
- Removed hardcoded constants
- Added GameConfig import
- Updated applyForces() to read values from GameConfig.getInstance().shipPhysics
- Now reads physics parameters dynamically at runtime

Changes to index.html:
- Added Ship Physics section in Settings UI
- 4 number inputs with appropriate min/max/step values
- Help text explaining each parameter's effect on ship handling
- Section positioned after Developer settings

Changes to settingsScreen.ts:
- Added input element references for ship physics controls
- Updated loadSettings() to populate ship physics inputs from config
- Updated saveSettings() to save ship physics values to config
- Values persist across sessions via localStorage

Benefits:
- Ship physics now tunable in real-time via settings UI
- Parameters persist across sessions
- Easy to reset to defaults
- Centralized configuration management
- No need to edit code to adjust ship handling

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 13:05:27 -06:00
.github/workflows increased heap space. 2025-10-28 12:01:29 -05:00
docs Add Blender export tooling and refactor asset structure 2025-11-06 12:25:34 -06:00
public Add local controller profiles and disable online repository 2025-11-07 11:31:13 -06:00
scripts Add Blender export tooling and refactor asset structure 2025-11-06 12:25:34 -06:00
server Initial Commit 2025-02-15 11:19:24 -06:00
src Make ship physics constants configurable via GameConfig with UI 2025-11-07 13:05:27 -06:00
themes/default Fix level double initialization and refactor ship physics 2025-11-07 11:16:50 -06:00
.gitignore Initial Commit 2025-02-15 11:19:24 -06:00
CLAUDE.md Refactor sight to crosshair reticle and rename starfield to rockFactory 2025-10-30 10:21:27 -05:00
CONTROLLER_THRUST.md Refactor ship controls to force-based physics with world-space transformations 2025-10-31 11:20:31 -05:00
index.html Make ship physics constants configurable via GameConfig with UI 2025-11-07 13:05:27 -06:00
package-lock.json Add Blender export tooling and refactor asset structure 2025-11-06 12:25:34 -06:00
package.json Add Blender export tooling and refactor asset structure 2025-11-06 12:25:34 -06:00
styles.css Add difficulty levels and upgrade BabylonJS 2025-10-17 09:05:18 -05:00
tsconfig.json Initial Commit 2025-02-15 11:19:24 -06:00
vite.config.ts Add difficulty levels and upgrade BabylonJS 2025-10-17 09:05:18 -05:00