SceneLoadOptions
此内容尚不支持你的语言。
Defined in: scene/scene.ts:94
Properties
Section titled “Properties”abortOnMissingAssets?
Section titled “abortOnMissingAssets?”
optionalabortOnMissingAssets?:boolean
Defined in: scene/scene.ts:110
If true, throw after preloading when any asset is missing; the scene is not spawned. Default is false (legacy behaviour: missing assets get handle 0, scene loads anyway).
assetBaseUrl?
Section titled “assetBaseUrl?”
optionalassetBaseUrl?:string
Defined in: scene/scene.ts:96
assets?
Section titled “assets?”
optionalassets?:Assets
Defined in: scene/scene.ts:95
collectAssets?
Section titled “collectAssets?”
optionalcollectAssets?:LoadedSceneAssets
Defined in: scene/scene.ts:97
externalEntities?
Section titled “externalEntities?”
optionalexternalEntities?:ReadonlyMap<number,number>
Defined in: scene/scene.ts:116
Authored ids this document may reference that live in another one — the persistent rows a streamed cell is allowed to name. Absent = a reference outside the document resolves to nothing, which is what it always did.
onMissingAssets?
Section titled “onMissingAssets?”
optionalonMissingAssets?:MissingAssetCallback
Defined in: scene/scene.ts:104
Invoked once during load with the list of asset refs that could not be loaded (unresolved UUID or fetch failure). Fires even if the list is empty — callers that want “missing asset” UI wire this up.
onPhase?
Section titled “onPhase?”
optionalonPhase?:ScenePhaseSink
Defined in: scene/scene.ts:125
Where a load’s time went, phase by phase. Most of it runs between frames — off every system timer there is — so a profiler watching the frame loop sees the cost and cannot say what it was.
A name may be dotted, and a dot means containment: spawn.components is
part of spawn, so a reader sums the roots and never the whole list.
onProgress?
Section titled “onProgress?”
optionalonProgress?:SceneLoadProgressCallback
Defined in: scene/scene.ts:98