跳转到内容

SceneContext

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

Defined in: scene/sceneManager.ts:85

A live scene, as setup receives it and load answers with. Everything it spawns or adopts is scene-owned and goes away when the scene unloads, which is why an entity or an asset reference nothing records is one nothing releases.

readonly entities: ReadonlySet<number>

Defined in: scene/sceneManager.ts:87


readonly name: string

Defined in: scene/sceneManager.ts:86

adopt(entity): void

Defined in: scene/sceneManager.ts:90

Track an externally-spawned entity as scene-owned (despawned on unload).

number

void


bindPostProcess(camera, stack): void

Defined in: scene/sceneManager.ts:108

number

PostProcessStack

void


despawn(entity): void

Defined in: scene/sceneManager.ts:106

number

void


registerDrawCallback(id, fn): void

Defined in: scene/sceneManager.ts:107

string

DrawCallback

void


setPersistent(entity, persistent): void

Defined in: scene/sceneManager.ts:110

number

boolean

void


spawn(): number

Defined in: scene/sceneManager.ts:88

number


trackAssets(byType): void

Defined in: scene/sceneManager.ts:97

Track assets a loader acquired for this scene, so unload gives them back.

The asset half of adopt: a scene whose data arrives inside setup preloads its own, and a reference nothing records is one nothing releases.

ReadonlyMap<string, ReadonlySet<string>>

void


trackAssetScope(scope): void

Defined in: scene/sceneManager.ts:105

Take over the receipts a loader acquired for this scene.

What trackAssets is for a caller that only ever had paths. A caller holding receipts hands them over instead: unload then gives back the acquisitions this load made, not the oldest ones sharing their path.

AssetScope

void


unbindPostProcess(camera): void

Defined in: scene/sceneManager.ts:109

number

void