Repository navigation
API Class SceneManager
Defined in: src/engine/scene/SceneManager.ts:117
Loads scene files as scene nodes under the World root (ADR 0016). Acts on the current World (ADR 0032): the one whose frame is running, else the Engine's default World. A load captures that World when called, so the swap lands there even though it happens later.
await SceneManager.load("scenes/level1.scene.json");
await SceneManager.load("scenes/hud.scene.json", { additive: true });new SceneManager(): SceneManager;SceneManager
get static activeScene(): GameObject | null;Defined in: src/engine/scene/SceneManager.ts:119
The most recently loaded scene node.
GameObject | null
get static scenes(): GameObject[];Defined in: src/engine/scene/SceneManager.ts:124
All loaded scene nodes, oldest first.
static load(path, options?): Promise<GameObject>;Defined in: src/engine/scene/SceneManager.ts:132
Load a scene file. Assets are preloaded first; the swap happens at the end of the current frame (or immediately when the engine isn't mid-frame). Resolves with the new scene node.
string
LoadSceneOptions = {}
Promise<GameObject>
static preload(paths): Promise<void>;Defined in: src/engine/scene/SceneManager.ts:231
Warm up prefabs and materials ahead of time (ADR 0080): their textures and models load, and the
renderer draws each once, hidden, so the shader pipelines they need exist before they're spawned.
For content chosen at runtime (a boss before its arena opens); scene loads already warm what their
scene, its settings.preload list and the project's scripts name.
await SceneManager.preload(["prefabs/boss.prefab.json"]);string[]
Promise<void>
static unload(scene): void;Defined in: src/engine/scene/SceneManager.ts:239
Unload a scene node and everything in it (at the end of the frame).
void
static whenReady(): Promise<void>;Defined in: src/engine/scene/SceneManager.ts:217
Resolves when the current World has no load in flight and the latest reached readiness (ADR 0616): at once if nothing is loading; rejects if that load failed or the World is unloaded first.
Promise<void>
This wiki is generated from docs/wiki/ and the myco module's source on every push to master. Change pages there in a pull request: edits made here are not kept.
Basics
Gameplay
Rendering
Audio
- Playing sound
- Why is there no sound?
- Playlists
- Interactive music
- Sound generators
- Spatial audio
- Audio mixer
- Live mixing
- Loudness
- Audio profiler
- Audio takes
Reference