Creates a new ImageBitmapLoader.
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.
An optional object that sets options for the internally used createImageBitmap factory method. 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.
Whether the XMLHttpRequest uses credentials. See .setWithCredentials. Default is false.
Begin loading from url and return the image object that will contain the data.
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 image.
This callback function is currently not supported.
Will be called when load errors.
Begin loading from url and return the image object that will contain the data.
The path or URL to the file. This can also be a Data URI.
This callback function is currently not supported.
The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
Sets the options object for createImageBitmap.
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
A loader for loading an Image as an ImageBitmap. An ImageBitmap provides an asynchronous and resource efficient pathway to prepare textures for rendering in WebGL. Unlike FileLoader, ImageBitmapLoader does not avoid multiple concurrent requests to the same URL.
Note that Texture.flipY and Texture.premultiplyAlpha with ImageBitmap are ignored. ImageBitmap needs these configuration on bitmap creation unlike regular images need them on uploading to GPU. You need to set the equivalent options via ImageBitmapLoader.setOptions instead. Refer to WebGL specification for the detail.
Examples
WebGL / loader / ImageBitmap
Code Example