Skip to content

Commit

Permalink
add export
Browse files Browse the repository at this point in the history
  • Loading branch information
elalish committed Apr 5, 2022
1 parent c2c28c3 commit eb67540
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions examples/js/loaders/GLTFLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@

return this.detectSupport().then( function ( isSupported ) {

if ( isSupported ) return parser.loadTextureImage( textureIndex, source, loader );
if ( isSupported ) return parser.loadTextureImage( textureIndex, extension.source, loader );

if ( json.extensionsRequired && json.extensionsRequired.indexOf( name ) >= 0 ) {

Expand Down Expand Up @@ -2317,7 +2317,11 @@
break;

case 'animation':
dependency = this.loadAnimation( index );
dependency = this._invokeOne( function ( ext ) {

return ext.loadAnimation && ext.loadAnimation( index );

} );
break;

case 'camera':
Expand Down Expand Up @@ -3996,5 +4000,6 @@
}

THREE.GLTFLoader = GLTFLoader;
THREE.getNormalizedComponentScale = getNormalizedComponentScale;

} )();
2 changes: 1 addition & 1 deletion examples/js/utils/SceneUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@

if ( position !== undefined ) {

const scale = THREE.getNormalizedComponentScale( position );
const scale = THREE.getNormalizedComponentScale( position.array.constructor );

for ( let i = 0, l = position.count; i < l; i ++ ) {

Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/loaders/GLTFLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -4399,4 +4399,4 @@ function toTrianglesDrawMode( geometry, drawMode ) {

}

export { GLTFLoader };
export { GLTFLoader, getNormalizedComponentScale };
2 changes: 1 addition & 1 deletion examples/jsm/utils/SceneUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function reduceVertices( func, initialValue ) {

if ( position !== undefined ) {

const scale = getNormalizedComponentScale( position );
const scale = getNormalizedComponentScale( position.array.constructor );

for ( let i = 0, l = position.count; i < l; i ++ ) {

Expand Down

0 comments on commit eb67540

Please sign in to comment.