Refactor simulation and viewer architecture
This commit is contained in:
67
apps/viewer/src/contractsCelestial.ts
Normal file
67
apps/viewer/src/contractsCelestial.ts
Normal file
@@ -0,0 +1,67 @@
|
||||
import type { Vector3Dto } from "./contractsCommon";
|
||||
|
||||
export interface SystemSnapshot {
|
||||
id: string;
|
||||
label: string;
|
||||
galaxyPosition: Vector3Dto;
|
||||
starKind: string;
|
||||
starCount: number;
|
||||
starColor: string;
|
||||
starSize: number;
|
||||
planets: PlanetSnapshot[];
|
||||
}
|
||||
|
||||
export interface PlanetSnapshot {
|
||||
label: string;
|
||||
planetType: string;
|
||||
shape: string;
|
||||
moonCount: number;
|
||||
orbitRadius: number;
|
||||
orbitSpeed: number;
|
||||
orbitEccentricity: number;
|
||||
orbitInclination: number;
|
||||
orbitLongitudeOfAscendingNode: number;
|
||||
orbitArgumentOfPeriapsis: number;
|
||||
orbitPhaseAtEpoch: number;
|
||||
size: number;
|
||||
color: string;
|
||||
hasRing: boolean;
|
||||
}
|
||||
|
||||
export interface ResourceNodeSnapshot {
|
||||
id: string;
|
||||
systemId: string;
|
||||
localPosition: Vector3Dto;
|
||||
sourceKind: string;
|
||||
oreRemaining: number;
|
||||
maxOre: number;
|
||||
itemId: string;
|
||||
}
|
||||
|
||||
export interface ResourceNodeDelta extends ResourceNodeSnapshot {}
|
||||
|
||||
export interface SpatialNodeSnapshot {
|
||||
id: string;
|
||||
systemId: string;
|
||||
kind: string;
|
||||
localPosition: Vector3Dto;
|
||||
bubbleId: string;
|
||||
parentNodeId?: string | null;
|
||||
occupyingStructureId?: string | null;
|
||||
orbitReferenceId?: string | null;
|
||||
}
|
||||
|
||||
export interface SpatialNodeDelta extends SpatialNodeSnapshot {}
|
||||
|
||||
export interface LocalBubbleSnapshot {
|
||||
id: string;
|
||||
nodeId: string;
|
||||
systemId: string;
|
||||
radius: number;
|
||||
occupantShipIds: string[];
|
||||
occupantStationIds: string[];
|
||||
occupantClaimIds: string[];
|
||||
occupantConstructionSiteIds: string[];
|
||||
}
|
||||
|
||||
export interface LocalBubbleDelta extends LocalBubbleSnapshot {}
|
||||
Reference in New Issue
Block a user