Skip to content

Commit e0d858e

Browse files
committed
Updated examples builds
1 parent cf079d4 commit e0d858e

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

examples/js/exporters/GLTFExporter.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,6 @@
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
}

examples/js/loaders/GLTFLoader.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@
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
*/
@@ -686,7 +686,7 @@
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
*/
@@ -986,7 +986,7 @@
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
*/
@@ -2340,7 +2340,9 @@
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

@@ -2352,7 +2354,7 @@
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 );
@@ -2375,6 +2377,11 @@
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;

0 commit comments

Comments
 (0)