Skip to content

API Interface EngineOptions

github-actions[bot] edited this page Nov 29, 2026 · 5 revisions

Interface: EngineOptions

Defined in: src/engine/boot/Engine.ts:24

Properties

assets?

assets?: AssetSource | AssetSource[];

Defined in: src/engine/boot/Engine.ts:31

Asset sources, e.g. Assets.fromGlob(import.meta.glob("./**/*.png", { eager: true, import: "default" })). Registered while the Engine lives; dispose() removes them (ADR 0319).


bootstrap?

bootstrap?: 
  | BootstrapSetting
  | Bootstrap;

Defined in: src/engine/boot/Engine.ts:63

Which Worlds to create (ADR 0032): a declarative config or a code bootstrap. Default: the project's bootstrap setting, else the default bootstrap (one World).


container?

container?: HTMLElement;

Defined in: src/engine/boot/Engine.ts:33

Element the canvas is placed in. Omit (or pass headless: true) to run without rendering.


headless?

headless?: boolean;

Defined in: src/engine/boot/Engine.ts:34


kind?

kind?: WorldKind;

Defined in: src/engine/boot/Engine.ts:52

"runtime" for games (default); "editor" for the scene editor's Editor World (ADR 0016, 0022). Without a bootstrap option, an editor (or server) Engine gets that one World and ignores the project's bootstrap.


loadScript?

loadScript?: (path) => Promise<Bootstrap>;

Defined in: src/engine/boot/Engine.ts:69

Imports a code bootstrap's script ("bootstrap": "scripts/Bootstrap.ts") and returns its bootstrap export. The editor passes its script loader (ADR 0030); games import the function and pass it as bootstrap instead.

Parameters

path

string

Returns

Promise<Bootstrap>


project?

project?: ProjectSettingsInput;

Defined in: src/engine/boot/Engine.ts:26

Project settings (usually the game's project.json).


quality?

quality?: "player" | "keep";

Defined in: src/engine/boot/Engine.ts:58

Graphics quality (ADR 0050, 0055): "player" (default) activates the player's saved tier, or detects one when the project allows it; "keep" leaves the active tier alone (the editor's Play mode, so its previewed tier stays).


storage?

storage?: StorageBackend;

Defined in: src/engine/boot/Engine.ts:46

Storage backend for saves/settings (ADR 0024). Defaults to files under Tauri, IndexedDB in browsers, memory when headless.

Clone this wiki locally