Creates a new FileLoader.
The loadingManager for the loader to use. Default is THREE.DefaultLoadingManager.
Creates a new Loader.
The loadingManager for the loader to use. Default is THREE.DefaultLoadingManager.
The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS. Default is anonymous.
The loadingManager the loader is using. Default is DefaultLoadingManager.
The expected mimeType. See .setMimeType. Default is undefined.
The base path from which the asset will be loaded. Default is the empty string.
The request header used in HTTP request. See .setRequestHeader. Default is empty object.
The base path from which additional resources like textures will be loaded. Default is the empty string.
The expected response type. See .setResponseType. Default is undefined.
Whether the XMLHttpRequest uses credentials. See .setWithCredentials. Default is false.
Load the URL and pass the response to the onLoad function.
The path or URL to the file. This can also be a Data URI.
Will be called when loading completes. The argument will be the loaded response.
Will be called if an error occurs.
Load the URL and pass the response to the onLoad function.
The path or URL to the file. This can also be a Data URI.
The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
Set the expected mimeType of the file being loaded. Note that in many cases this will be determined automatically, so by default it is undefined.
Set the base path for the asset.
key: The name of the header whose value is to be set. value: The value to set as the body of the header. Set the request header used in HTTP request.
Set the base path for dependent resources like textures.
Change the response type. Valid values are:
Whether the XMLHttpRequest uses credentials such as cookies, authorization headers or TLS client certificates. See XMLHttpRequest.withCredentials. Note that this has no effect if you are loading files locally or from the same domain.
Generated using TypeDoc
A low level class for loading resources with XMLHttpRequest, used internaly by most loaders. It can also be used directly to load any file type that does not have a loader.
Code Example
Note: The cache must be enabled using THREE.Cache.enabled = true; This is a global property and only needs to be set once to be used by all loaders that use FileLoader internally. Cache is a cache module that holds the response from each request made through this loader, so each file is requested once.