|
@@ -634,7 +634,7 @@
|
|
|
|
|
|
}
|
|
|
/**
|
|
|
- * BasisU Texture Extension
|
|
|
+ * BasisU THREE.Texture Extension
|
|
|
*
|
|
|
* Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_texture_basisu
|
|
|
*/
|
|
@@ -686,7 +686,7 @@
|
|
|
|
|
|
}
|
|
|
/**
|
|
|
- * WebP Texture Extension
|
|
|
+ * WebP THREE.Texture Extension
|
|
|
*
|
|
|
* Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_texture_webp
|
|
|
*/
|
|
@@ -986,7 +986,7 @@
|
|
|
|
|
|
}
|
|
|
/**
|
|
|
- * Texture Transform Extension
|
|
|
+ * THREE.Texture Transform Extension
|
|
|
*
|
|
|
* Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_texture_transform
|
|
|
*/
|
|
@@ -2340,7 +2340,9 @@
|
|
|
|
|
|
onLoad = function ( imageBitmap ) {
|
|
|
|
|
|
- resolve( new THREE.CanvasTexture( imageBitmap ) );
|
|
|
+ const texture = new THREE.Texture( imageBitmap );
|
|
|
+ texture.needsUpdate = true;
|
|
|
+ resolve( texture );
|
|
|
|
|
|
};
|
|
|
|
|
@@ -2352,7 +2354,7 @@
|
|
|
|
|
|
} ).then( function ( texture ) {
|
|
|
|
|
|
- // Clean up resources and configure Texture.
|
|
|
+ // Clean up resources and configure THREE.Texture.
|
|
|
if ( isObjectURL === true ) {
|
|
|
|
|
|
URL.revokeObjectURL( sourceURI );
|
|
@@ -2375,6 +2377,11 @@
|
|
|
} );
|
|
|
return texture;
|
|
|
|
|
|
+ } ).catch( function () {
|
|
|
+
|
|
|
+ console.error( 'THREE.GLTFLoader: Couldn\'t load texture', sourceURI );
|
|
|
+ return null;
|
|
|
+
|
|
|
} );
|
|
|
this.textureCache[ cacheKey ] = promise;
|
|
|
return promise;
|