Browse Source

One day I will push a complete commit in one try...but not today

David Catuhe 8 năm trước cách đây
mục cha
commit
73474a8866

+ 1 - 1
loaders/src/glTF/2.0/Extensions/MSFT_lod.ts

@@ -32,7 +32,7 @@ module BABYLON.GLTF2.Extensions {
             var materialLODs = [material.index, ...properties.ids];
             var materialLODs = [material.index, ...properties.ids];
 
 
             loader.addLoaderPendingData(material);
             loader.addLoaderPendingData(material);
-            for (var index = 0; index < materialLODs.length - 1; index++) {
+            for (var index = 0; index < materialLODs.length; index++) {
                 loader.addLoaderNonBlockingPendingData(index);
                 loader.addLoaderNonBlockingPendingData(index);
             }
             }
 
 

+ 1 - 1
loaders/src/glTF/2.0/babylon.glTFLoader.ts

@@ -913,7 +913,7 @@ module BABYLON.GLTF2 {
                 this._onLoaderFirstLODComplete();
                 this._onLoaderFirstLODComplete();
             }
             }
 
 
-            if ((!this._nonBlockingData || this._nonBlockingData.length === 0) && this._loaderPendingCount <= 0) {
+            if ((!this._nonBlockingData || this._nonBlockingData.length === 0) && this._loaderPendingCount === 0) {
                 this._onLoaderComplete();
                 this._onLoaderComplete();
                 this.dispose();
                 this.dispose();
             }
             }