new Application()
The main class of the engine. Inherit from this class to create your own game.
| Name | Type | Description |
|---|---|---|
width | number | The width of the canvas. |
height | number | The height of the canvas. |
fps | number | The fps of the game. |
clearColor | Color | The color to clear the canvas with. |
deltaTime | number | The time passed since the last frame. |
worldFacts | WorldFacts | Global facts registry. |
eventBus | TypedEventBus | Core typed event bus. |
ruleEngine | RuleEngine | Reactive rule engine. |
audioBuses | AudioBusSystem | Audio bus routing system. |
versionedSave | VersionedSaveEngine | Versioned game save/load engine. |
- Source
Members
scene
Get the active scene.
- Source
Methods
(async) loadScene(path)
Load a scene via the application (editor helper).
Parameters:
| Name | Type | Description |
|---|---|---|
path | string |
- Source
pause()
Pause the game logic (updates). Rendering continues.
- Source
resetProject()
Clear editor project state and invalidate asynchronous scene loads.
- Source
resume()
Resume the game logic.
- Source
start()
Start the application (public method)
- Source
stop()
Stop the game loop. Calling start() later resumes the existing instance.
- Source