Options
All
  • Public
  • Public/Protected
  • All
Menu

Provides simulation management that is shared by both client and server

Hierarchy

  • SimulationEngine

Index

Constructors

constructor

  • Parameters

    • classRegistry: ClassRegistry<Serializable>

      A ClassRegistrythat will be used for serialization and typeIds, should be synced between server and client for state to be networked correctly.

    Returns SimulationEngine

Properties

Private classRegistry

classRegistry: any

Private componentTypes

componentTypes: any

Private continuousInputTypes

continuousInputTypes: any

Private systems

systems: any

Methods

addSystem

  • addSystem(system: System): void
  • Parameters

    Returns void

cloneSimulationFrame

constructComponentData

  • Parameters

    Returns Serializable

copyInputFrame

  • Parameters

    Returns void

copySimulationState

createInputFrame

  • TODO Implement evented input Evented input has reliable and ordered delivery, and does not persist beyond the frame it is processed in. Good for things like shooting a single projectile in a target direction, putting points in a stat.

    Returns InputFrame

createSimulationFrame

registerComponentType

  • registerComponentType<T>(componentType: new () => T, componentTypeName: string): void
  • Type parameters

    Parameters

    • componentType: new () => T
        • new (): T
        • Returns T

    • componentTypeName: string

    Returns void

registerContinuousInputType

  • registerContinuousInputType<T>(inputType: new () => T, inputTypeName: string): void

removeSystem

  • removeSystem(system: System): void
  • Parameters

    Returns void

stepSimulation

  • Runs 1 simulation step with duration of timeDeltaS to produce nextFrame from previousFrame using the simulation provided by the registered systems.

    Parameters

    Returns void

Generated using TypeDoc