The controller of the star system manages all resources specific to a single star system. Changing star system means destroying and creating a new controller.

Constructors

Properties

The model of the star system that describes it and generates the randomness

objectToParents: Map<OrbitalObject, OrbitalObject[]> = ...

Relation between orbital objects and their parents

scene: UberScene
starFieldBox: StarFieldBox
subSystems: SubStarSystem[] = []

Translation of the system data model in terms of actual 3D objects

Methods

  • Loads the star system from the underlying data model. This instantiates all stars, planets, satellites, anomalies and space stations in the star system.

    Returns Promise<void>

  • Translates all celestial bodies and spacestations in the system by the given displacement

    Parameters

    • displacement: Vector3

      The displacement applied to all bodies

    Returns void

  • Updates the system and all its orbital objects forward in time by the given delta time. The nearest object is kept in place and the other objects are updated accordingly.

    Parameters

    • deltaSeconds: number

      The time elapsed since the last update

    • chunkForge: ChunkForge

      The chunk forge used to update the LOD of the telluric planets

    • postProcessManager: PostProcessManager

    Returns void