Capítulo 174 de 859
A loader for loading images. The class loads images with the HTML Image API.
Please note that ImageLoader has dropped support for progress events in r84. For an ImageLoader that supports progress events, see this thread.
const loader = new THREE.ImageLoader();
const image = await loader.loadAsync( 'image.png' );
Constructor
| Signature |
|---|
new ImageLoader( manager : LoadingManager ) |
Methods
| Method | Description |
|---|---|
.load( url : string, onLoad : function, onProgress : onProgressCallback, onError : onErrorCallback ) : Image | Starts loading from the given URL and passes the loaded image to the onLoad() callback. The method also returns a new Image object which can directly be used for texture creation. If you do it th… |