@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / index / getLoadedAsset
Function: getLoadedAsset() ​
ts
function getLoadedAsset<T>(source): T | undefined;Defined in: assets/runtimeAssets.ts:354
A loaded file, or undefined if it isn't ready: a GLTF for a model, a THREE.Texture for an image, a PrefabAsset for a prefab, an ArrayBuffer for anything else.
A model's scene is shared: mount a clone, never the scene itself. A texture reads as data until you say otherwise: set colorSpace for a colour map.
Type Parameters ​
| Type Parameter | Default type |
|---|---|
T | unknown |
Parameters ​
| Parameter | Type |
|---|---|
source | AssetSource |
Returns ​
T | undefined

