Load assets
You can use imported assets from code using the service AssetLoader
which lets you get instances of an asset by name or id.
In the example below, we see how the AssetLoader is injected and used in the onInit method to get a model by name.
Methods
getModelByAssetName(name: string): { scene, animations }
getModelByAssetId(id: string): { scene, animations }
getTextureByAssetName(name: string): Texture
getTextureByAssetId(id: string): Texture
getMaterialByAssetId(id: string): Material
Last updated