跳转到内容

SceneManagerState

此内容尚不支持你的语言。

Defined in: scene/sceneManager.ts:267

Scene loading and transitions, as Res(SceneManager) hands it over. A scene is a unit of ownership as much as of content: what it spawned is despawned and what it acquired is released when it unloads.

@beta: the vocabulary is settled, but one certified project drives it against twenty-six signatures — thin evidence for that breadth of promise.

new SceneManagerState(app): SceneManagerState

Defined in: scene/sceneManager.ts:282

App

SceneManagerState

bringToTop(name): void

Defined in: scene/sceneManager.ts:924

string

void


discardPrepared(name): number

Defined in: scene/sceneManager.ts:439

Give back what prepare readied, answering how many acquisitions came back with it. Zero for a scene that readied nothing.

string

number


getActive(): string | null

Defined in: scene/sceneManager.ts:902

string | null


getActiveScenes(): string[]

Defined in: scene/sceneManager.ts:906

string[]


getInitial(): string | null

Defined in: scene/sceneManager.ts:327

string | null


getLoaded(): string[]

Defined in: scene/sceneManager.ts:916

string[]


getLoadOrder(): string[]

Defined in: scene/sceneManager.ts:920

string[]


getScene(name): SceneContext | null

Defined in: scene/sceneManager.ts:931

string

SceneContext | null


getSceneStatus(name): SceneStatus | null

Defined in: scene/sceneManager.ts:935

string

SceneStatus | null


isActive(name): boolean

Defined in: scene/sceneManager.ts:898

string

boolean


isLoaded(name): boolean

Defined in: scene/sceneManager.ts:894

string

boolean


isPaused(name): boolean

Defined in: scene/sceneManager.ts:886

string

boolean


isSleeping(name): boolean

Defined in: scene/sceneManager.ts:890

string

boolean


isTransitioning(): boolean

Defined in: scene/sceneManager.ts:331

boolean


load(name, onProgress?): Promise<SceneContext>

Defined in: scene/sceneManager.ts:406

Replace whatever is active with name.

string

SceneLoadProgressCallback

Promise<SceneContext>


loadAdditive(name, onProgress?): Promise<SceneContext>

Defined in: scene/sceneManager.ts:411

Bring name up alongside whatever is already running.

string

SceneLoadProgressCallback

Promise<SceneContext>


pause(name): void

Defined in: scene/sceneManager.ts:804

string

void


prepare(name): Promise<void>

Defined in: scene/sceneManager.ts:419

Ready name without bringing it up. A no-op for a scene that declares no preparation, and for one already loaded — there is nothing left to hide.

string

Promise<void>


readyRenderPrograms(name): Promise<RenderReadiness>

Defined in: scene/sceneManager.ts:429

Make the render programs name’s prepared content requires ready.

string

Promise<RenderReadiness>

Not applicable where the scene declares no readying or is already up; otherwise the claim, or null when one could not be made.


register(config): void

Defined in: scene/sceneManager.ts:319

SceneConfig

void


reload(options?): Promise<void>

Defined in: scene/sceneManager.ts:345

Start the active scene over: retire it and bring it back up, entities and all. switchTo cannot express this — asked for the scene already running it does nothing, which is the right answer for a gate and the wrong one for every death, retry and restart there is.

TransitionOptions

Promise<void>


reset(): void

Defined in: scene/sceneManager.ts:293

Forget the scenes while the caller keeps the World.

scene-teardown: NOT the shared protocol. Entities stay, so what they still render must not be released under them — and a dropped instance therefore keeps its receipts and systems. No caller in this repo says if that is right.

void


resume(name): void

Defined in: scene/sceneManager.ts:812

string

void


setInitial(name): void

Defined in: scene/sceneManager.ts:323

string

void


sleep(name): void

Defined in: scene/sceneManager.ts:820

string

void


switchTo(name, options?): Promise<void>

Defined in: scene/sceneManager.ts:335

string

TransitionOptions

Promise<void>


unload(name, options?): Promise<void>

Defined in: scene/sceneManager.ts:669

string

TransitionOptions

Promise<void>


updateTransition(dt): void

Defined in: scene/sceneManager.ts:401

number

void


wake(name): void

Defined in: scene/sceneManager.ts:852

string

void