new AssetLoader(ImporterType)
Parameters:
Name | Type | Description |
---|---|---|
ImporterType |
ImporterType The type of importer to use for the asset. For example: JPG, HCM (material), OBJ, ... Do NOT pass in an instance, just the class name! |
Members
-
crossOrigin
-
Allow setting a cross-origin string when loading images.
-
fileMap
-
Key/value pairs that allows replacing file names with new ones.
-
options
-
Key/value pairs that specify options to be passed on to the Importers. See the importer documentation for details on which options can be set.
Methods
-
load(file [, target])
-
Loads the asset.
Parameters:
Name Type Argument Description file
The filename/url to load, or a File object.
target
<optional>
An optional empty target asset. This allows lazy loading.
Returns:
Immediately returns an empty version of the assets that will be populated eventually during parsing.
- Type
- *
-
setRequestHeader(name, value)
-
Set custom http request headers.
Parameters:
Name Type Description name
The name of the header.
value
The value of the header.