The loaded asset
true if the uri is a valid URL (http, https, blob)
This is the loaded asset root object. If the asset is a glb/gltf file this will be the three#Scene object.
The url of the loaded asset (or the asset to be loaded)
use url
The url of the loaded asset (or the asset to be loaded)
true
if the asset has been loaded (via preload) or if it exists already (assigned to asset
)
loads the asset binary without creating an instance
Static
getGet an AssetReference for a URL to be easily loaded.
AssetReferences are cached so calling this method multiple times with the same arguments will always return the same AssetReference.
Optional
context: ContextGenerated using TypeDoc
AssetReferences can be used to easily load glTF or GLB assets
You can use
AssetReference.getOrCreate
to get an AssetReference for a URL to be easily loaded.When using the same URL multiple times the same AssetReference will be returned, this avoids loading or creating the same asset multiple times.
myAssetReference.preload()
to load the asset binary without creating an instance yet.myAssetReference.loadAssetAsync()
to load the asset and create an instance.myAssetReference.instantiate()
to load the asset and create a new instance.myAssetReference.unload()
to dispose allocated memory and destroy the asset instance.