Application

new Application()

The main class of the engine. Inherit from this class to create your own game.

Properties
NameTypeDescription
widthnumber

The width of the canvas.

heightnumber

The height of the canvas.

fpsnumber

The fps of the game.

clearColorColor

The color to clear the canvas with.

deltaTimenumber

The time passed since the last frame.

worldFactsWorldFacts

Global facts registry.

eventBusTypedEventBus

Core typed event bus.

ruleEngineRuleEngine

Reactive rule engine.

audioBusesAudioBusSystem

Audio bus routing system.

versionedSaveVersionedSaveEngine

Versioned game save/load engine.

Members

scene

Get the active scene.

Methods

(async) loadScene(path)

Load a scene via the application (editor helper).

Parameters:
NameTypeDescription
pathstring

pause()

Pause the game logic (updates). Rendering continues.

resetProject()

Clear editor project state and invalidate asynchronous scene loads.

resume()

Resume the game logic.

start()

Start the application (public method)

stop()

Stop the game loop. Calling start() later resumes the existing instance.