Creates a new TextureLoader.
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 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.
Whether the XMLHttpRequest uses credentials. See .setWithCredentials. Default is false.
Begin loading from the given URL and pass the fully loaded texture to onLoad. The method also returns a new texture object which can directly be used for material creation. If you do it this way, the texture may pop up in your scene once the respective loading process is finished.
The path or URL to the file. This can also be a Data URI.
Will be called when load completes. The argument will be the loaded texture.
Will be called when load errors.
Begin loading from the given URL and pass the fully loaded texture to onLoad. The method also returns a new texture object which can directly be used for material creation. If you do it this way, the texture may pop up in your scene once the respective loading process is finished.
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 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.
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
Class for loading a texture. This uses the ImageLoader internally for loading files.
Examples
geometry / cube
Code Example
Code Example with Callbacks
Please note three.js r84 dropped support for TextureLoader progress events. For a TextureLoader that supports progress events, see this thread.