Buckets:
| import { ImageLoader } from './ImageLoader.js'; | |
| import { Texture } from '../textures/Texture.js'; | |
| import { Loader } from './Loader.js'; | |
| class TextureLoader extends Loader { | |
| constructor( manager ) { | |
| super( manager ); | |
| } | |
| load( url, onLoad, onProgress, onError ) { | |
| const texture = new Texture(); | |
| const loader = new ImageLoader( this.manager ); | |
| loader.setCrossOrigin( this.crossOrigin ); | |
| loader.setPath( this.path ); | |
| loader.load( url, function ( image ) { | |
| texture.image = image; | |
| texture.needsUpdate = true; | |
| if ( onLoad !== undefined ) { | |
| onLoad( texture ); | |
| } | |
| }, onProgress, onError ); | |
| return texture; | |
| } | |
| } | |
| export { TextureLoader }; | |
Xet Storage Details
- Size:
- 679 Bytes
- Xet hash:
- 9900c3f2749d69fdcb0a714172ec8cafae7acdc31ffab36963c6f86a444cf2a8
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.