Skip to content

SceneConfig

Defined in: scene/sceneManager.ts:48

A scene as registered: where its data comes from, the systems that run while it is loaded, and hooks either side of its lifetime. path and data are alternatives — a scene either loads from disk or is handed its content.

optional cleanup?: (ctx) => void

Defined in: scene/sceneManager.ts:54

SceneContext

void


optional data?: SceneData

Defined in: scene/sceneManager.ts:51


optional discardPrepared?: () => number

Defined in: scene/sceneManager.ts:69

Throw away what prepare readied, answering how many receipts came back.

number


optional externalEntities?: () => ReadonlyMap<number, number>

Defined in: scene/sceneManager.ts:60

Authored ids this scene may reference in ANOTHER document, resolved at load time. A streamed cell names the persistent world through this; nothing else has a document boundary to cross.

ReadonlyMap<number, number>


name: string

Defined in: scene/sceneManager.ts:49


optional onPhase?: (phase, ms) => void

Defined in: scene/sceneManager.ts:62

Where this scene’s load spent its time. See SceneLoadOptions.onPhase.

string

number

void


optional path?: string

Defined in: scene/sceneManager.ts:50


optional prepare?: () => Promise<void>

Defined in: scene/sceneManager.ts:67

Do everything this scene’s load can do without the world seeing anything — fetch, decode, acquire. Creates no entities; load publishes what it left.

Promise<void>


optional readyRenderPrograms?: () => Promise<RenderReadiness>

Defined in: scene/sceneManager.ts:75

Ready the render programs this scene’s content requires, from what prepare decoded. Absent means the obligation does not apply here, which is how a headless host satisfies it — never by inventing a claim.

Promise<RenderReadiness>


optional setup?: (ctx) => void | Promise<void>

Defined in: scene/sceneManager.ts:53

SceneContext

void | Promise<void>


optional systems?: object[]

Defined in: scene/sceneManager.ts:52

schedule: Schedule

system: SystemDef