Skip to content

Commit

Permalink
Code review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Zielon committed Jan 22, 2020
1 parent f20e8da commit 5ec904d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
8 changes: 3 additions & 5 deletions examples/js/loaders/GLTFLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,6 @@ THREE.GLTFLoader = ( function () {

if ( this.lazy ) {

parser.markDefs();

onLoad( { parser: parser } );

} else {
Expand Down Expand Up @@ -1463,6 +1461,9 @@ THREE.GLTFLoader = ( function () {

}

// Mark the special nodes/meshes in json for efficient parse
this.markDefs();

}

GLTFParser.prototype.parse = function ( onLoad, onError ) {
Expand All @@ -1474,9 +1475,6 @@ THREE.GLTFLoader = ( function () {
// Clear the loader cache
this.cache.removeAll();

// Mark the special nodes/meshes in json for efficient parse
this.markDefs();

Promise.all( [

this.getDependencies( 'scene' ),
Expand Down
1 change: 1 addition & 0 deletions examples/jsm/loaders/GLTFLoader.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export class GLTFLoader extends Loader {
setDDSLoader( ddsLoader: DDSLoader ): GLTFLoader;
parse( data: ArrayBuffer | string, path: string, onLoad: ( gltf: GLTF ) => void, onError?: ( event: ErrorEvent ) => void ) : void;
setLazyLoad( lazy: boolean ) : void;

}

export class GLTFParser {
Expand Down
8 changes: 3 additions & 5 deletions examples/jsm/loaders/GLTFLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,6 @@ var GLTFLoader = ( function () {

if ( this.lazy ) {

parser.markDefs();

onLoad( { parser: parser } );

} else {
Expand Down Expand Up @@ -1531,6 +1529,9 @@ var GLTFLoader = ( function () {

}

// Mark the special nodes/meshes in json for efficient parse
this.markDefs();

}

GLTFParser.prototype.parse = function ( onLoad, onError ) {
Expand All @@ -1542,9 +1543,6 @@ var GLTFLoader = ( function () {
// Clear the loader cache
this.cache.removeAll();

// Mark the special nodes/meshes in json for efficient parse
this.markDefs();

Promise.all( [

this.getDependencies( 'scene' ),
Expand Down

0 comments on commit 5ec904d

Please sign in to comment.