API

Type Alias SmartAssetManager

Stateful handle for a scene's smart asset registry.

Smart asset behavior is exposed through module-level functions rather than class methods so callers can import only the operations they need.

type SmartAssetManager = {
    onAssetNotFound:
        | ((key: string, expectedUrl: string) => Promise<string | File | null>)
        | null;
    onChangedObservable: Observable<void>;
    scene: Scene;
}
Index
onAssetNotFound:
    | ((key: string, expectedUrl: string) => Promise<string | File | null>)
    | null

Optional callback invoked when an asset cannot be found at its registered URL. Return a new URL or File to retry loading, or null to skip the asset.

onChangedObservable: Observable<void>

Fires when the smart asset registry or loaded asset state changes.

scene: Scene

The scene this manager is attached to.