|
@@ -1416,6 +1416,12 @@ THREE.GLTFLoader = ( function () {
|
|
|
this.textureLoader = new THREE.TextureLoader( this.options.manager );
|
|
|
this.textureLoader.setCrossOrigin( this.options.crossOrigin );
|
|
|
|
|
|
+ // Use an ImageBitmapLoader if imageBitmaps are supported. Moves much of the
|
|
|
+ // expensive work of uploading a texture to the GPU off the main thread.
|
|
|
+ if ( typeof createImageBitmap !== 'undefined' ) {
|
|
|
+ this.textureLoader.setImageLoader( new THREE.ImageBitmapLoader( this.options.manager ) );
|
|
|
+ }
|
|
|
+
|
|
|
this.fileLoader = new THREE.FileLoader( this.options.manager );
|
|
|
this.fileLoader.setResponseType( 'arraybuffer' );
|
|
|
|