File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 10961096 if ( maxEmissiveComponent > 1 ) {
10971097
10981098 emissive . multiplyScalar ( 1 / maxEmissiveComponent ) ;
1099-
11001099 console . warn ( 'THREE.GLTFExporter: Some emissive components exceed 1; emissive has been limited' ) ;
11011100
11021101 }
Original file line number Diff line number Diff line change 634634
635635 }
636636 /**
637- * BasisU Texture Extension
637+ * BasisU THREE. Texture Extension
638638 *
639639 * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_texture_basisu
640640 */
686686
687687 }
688688 /**
689- * WebP Texture Extension
689+ * WebP THREE. Texture Extension
690690 *
691691 * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_texture_webp
692692 */
986986
987987 }
988988 /**
989- * Texture Transform Extension
989+ * THREE. Texture Transform Extension
990990 *
991991 * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_texture_transform
992992 */
23402340
23412341 onLoad = function ( imageBitmap ) {
23422342
2343- resolve ( new THREE . CanvasTexture ( imageBitmap ) ) ;
2343+ const texture = new THREE . Texture ( imageBitmap ) ;
2344+ texture . needsUpdate = true ;
2345+ resolve ( texture ) ;
23442346
23452347 } ;
23462348
23522354
23532355 } ) . then ( function ( texture ) {
23542356
2355- // Clean up resources and configure Texture.
2357+ // Clean up resources and configure THREE. Texture.
23562358 if ( isObjectURL === true ) {
23572359
23582360 URL . revokeObjectURL ( sourceURI ) ;
23752377 } ) ;
23762378 return texture ;
23772379
2380+ } ) . catch ( function ( ) {
2381+
2382+ console . error ( 'THREE.GLTFLoader: Couldn\'t load texture' , sourceURI ) ;
2383+ return null ;
2384+
23782385 } ) ;
23792386 this . textureCache [ cacheKey ] = promise ;
23802387 return promise ;
You can’t perform that action at this time.
0 commit comments