Creates a new engine instance.
Configuration, available systems, components, and asset kinds, and optional shared resources.
Options for Engine.
The asset classes the game can use. The configuration picks from them by
assetName.
The component classes the game can use. The configuration picks from them by
componentName.
The game configuration: scenes, templates, systems, assets and global options.
Optionalresources?: Record<string, unknown>Extra data for systems, keyed by systemName. A system gets its entry in
options.resources. For example, BehaviorSystem gets the behavior
classes this way.
The system classes the game can use. The configuration picks from them by
systemName.
Pauses the engine by stopping the game loop.
The world and scene state remain in memory so it can be resumed with play.
Starts the engine. If the engine was already initialized, this resumes the game loop and re-attaches window listeners. Otherwise, it bootstraps the world, loads the start scene, creates the game loop, and begins execution.
A promise that resolves once the engine is fully started.
Stops the engine completely by stopping the game loop and destroying the world.
Main game engine responsible for bootstrapping scenes and systems, managing the game loop, and controlling lifecycle actions (play, pause, stop).