feat: migrate simulation to physically-based unit system
Replace arbitrary game units with real-world measurements throughout the simulation and viewer: planet orbits in AU, sizes in km, galaxy positions in light-years. Add SimulationUnits helpers for conversions, separate WarpSpeed from FtlSpeed for ships, fix FTL transit progress to use galaxy-space distances, overhaul Lagrange point placement with Hill sphere approximation, and update the viewer to scale and format all distances correctly. Ships in FTL transit now render in galaxy view. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,7 @@ import type {
|
||||
ShipVisual,
|
||||
SystemVisual,
|
||||
WorldState,
|
||||
ZoomLevel,
|
||||
} from "./viewerTypes";
|
||||
|
||||
export interface ViewerNavigationContext {
|
||||
@@ -34,6 +35,7 @@ export interface ViewerNavigationContext {
|
||||
getCameraTargetShipId: () => string | undefined;
|
||||
setCameraTargetShipId: (value: string | undefined) => void;
|
||||
getCurrentDistance: () => number;
|
||||
getZoomLevel: () => ZoomLevel;
|
||||
getSelectedItems: () => Selectable[];
|
||||
getOrbitYaw: () => number;
|
||||
galaxyFocus: THREE.Vector3;
|
||||
@@ -149,7 +151,7 @@ export class ViewerNavigationController {
|
||||
}
|
||||
|
||||
updateSystemDetailVisibility() {
|
||||
updateSystemDetailVisibility(this.context.systemVisuals, this.context.getActiveSystemId());
|
||||
updateSystemDetailVisibility(this.context.systemVisuals, this.context.getActiveSystemId(), this.context.getZoomLevel());
|
||||
}
|
||||
|
||||
getCameraFocusWorldPosition() {
|
||||
|
||||
Reference in New Issue
Block a user