Protected
Optional
_Protected
_If true, imported assets are cached in memory(as js/three.js objects) and can be reused later. They will be cleared when dispose event is fired on the object or clearCache is called.
Readonly
importersProtected
_Protected
_Protected
_Protected
_Protected
_Adds a listener to an event type.
The type of event to listen to.
The function that gets called when the event is fired.
Clear memory asset and loader cache. Browser cache and custom cache storage is not cleared with this.
Import single or multiple assets(like in case of zip files) from a path(url) or an IAsset.
Optional
assetOrPath: string | IAsset | File | IAsset[] | File[]The path or asset to import
Optional
options: ImportAssetOptionsOptions for the import
Optional
asset: IAssetOptional
onDownloadProgress: (e: ProgressEvent) => voidOptional
file: FileOptional
onDownloadProgress: (e: ProgressEvent) => voidImport multiple local files/blobs from a map of files, like when a local folder is loaded, or when multiple files are dropped.
Import a single asset from a path(url) or an IAsset.
Optional
asset: string | IAsset | FileOptional
options: ImportAssetOptionsOptional
path: stringuse processRaw instead
Process the raw output from the loaders and return the updated/patched-objects.
Optional
path: stringOptional
path: stringRemove a file from the database and revoke the object url if it exists.
Asset Importer
Utility class to import assets from local files, blobs, urls, etc. Used in AssetManager to import assets. Acts as a wrapper over three.js LoadingManager and adds support for dynamically loading loaders, caching assets, better event dispatching and file tracking.