Skip to main content

TEngine

Index

Constructors

constructor

  • new TEngine(config: TConfig, workerScope: DedicatedWorkerGlobalScope): default
  • Parameters

    • config: TConfig
    • workerScope: DedicatedWorkerGlobalScope

    Returns default

Properties

publicdebugPanel

debugPanel: default

publicevents

events: default

Event queue for the engine which will recieve all events. Events are broadcast to the active game state queue and any workers.

Add listeners to the game state queue to ensure they are only called when the game state is active.

publicgameState

gameState: default = ...

publicjobs

jobs: default

publicoptionalmouse

publicrenderingSize

renderingSize: { height: number; width: number } = ...

Type declaration

  • height: number
  • width: number

publicresources

resources: default

publicsegmentTimer

segmentTimer: default

publicstats

stats: { engineTime: number } & TWorldUpdateStats = ...

Methods

onMessage

  • onMessage(ev: MessageEvent<any>): Promise<void>
  • Parameters

    • ev: MessageEvent<any>

    Returns Promise<void>

publicupdateEngineContext

publicupdateGameContext