David Catuhe пре 7 година
родитељ
комит
25369da576

Разлика између датотеке није приказан због своје велике величине
+ 657 - 656
Playground/babylon.d.txt


Разлика између датотеке није приказан због своје велике величине
+ 659 - 658
dist/preview release/babylon.d.ts


Разлика између датотеке није приказан због своје велике величине
+ 15 - 15
dist/preview release/babylon.js


+ 12 - 6
dist/preview release/babylon.max.js

@@ -54840,6 +54840,7 @@ var BABYLON;
                 }
                 if (folders.length === 0) {
                     this._processFiles(files_1);
+                    this._processReload();
                 }
                 else {
                     var remaining = { count: folders.length };
@@ -54847,15 +54848,20 @@ var BABYLON;
                         var folder = folders_1[_i];
                         this._traverseFolder(folder, files_1, remaining, function () {
                             _this._processFiles(files_1);
+                            if (remaining.count === 0) {
+                                _this._processReload();
+                            }
                         });
                     }
                 }
-                if (this._onReloadCallback) {
-                    this._onReloadCallback(this._sceneFileToLoad);
-                }
-                else {
-                    this.reload();
-                }
+            }
+        };
+        FilesInput.prototype._processReload = function () {
+            if (this._onReloadCallback) {
+                this._onReloadCallback(this._sceneFileToLoad);
+            }
+            else {
+                this.reload();
             }
         };
         FilesInput.prototype.reload = function () {

Разлика између датотеке није приказан због своје велике величине
+ 15 - 15
dist/preview release/babylon.worker.js


Разлика између датотеке није приказан због своје велике величине
+ 15 - 15
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


+ 12 - 6
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js

@@ -54686,6 +54686,7 @@ var BABYLON;
                 }
                 if (folders.length === 0) {
                     this._processFiles(files_1);
+                    this._processReload();
                 }
                 else {
                     var remaining = { count: folders.length };
@@ -54693,15 +54694,20 @@ var BABYLON;
                         var folder = folders_1[_i];
                         this._traverseFolder(folder, files_1, remaining, function () {
                             _this._processFiles(files_1);
+                            if (remaining.count === 0) {
+                                _this._processReload();
+                            }
                         });
                     }
                 }
-                if (this._onReloadCallback) {
-                    this._onReloadCallback(this._sceneFileToLoad);
-                }
-                else {
-                    this.reload();
-                }
+            }
+        };
+        FilesInput.prototype._processReload = function () {
+            if (this._onReloadCallback) {
+                this._onReloadCallback(this._sceneFileToLoad);
+            }
+            else {
+                this.reload();
             }
         };
         FilesInput.prototype.reload = function () {

Разлика између датотеке није приказан због своје велике величине
+ 7 - 7
dist/preview release/viewer/babylon.viewer.js


+ 14 - 6
src/Tools/babylon.filesInput.ts

@@ -182,25 +182,33 @@
 
                 if (folders.length === 0) {
                     this._processFiles(files);
+                    this._processReload();
                 } else {
                     var remaining = { count: folders.length };
                     for (var folder of folders) {
                         this._traverseFolder(folder, files, remaining, () => {
                             this._processFiles(files);
+
+                            if (remaining.count === 0) {
+                                this._processReload();
+                            }
                         });
                     }
                 }
 
-                if (this._onReloadCallback) {
-                    this._onReloadCallback(this._sceneFileToLoad);
-                }
-                else {
-                    this.reload();
-                }
 
             }
         }
 
+        private _processReload() {
+            if (this._onReloadCallback) {
+                this._onReloadCallback(this._sceneFileToLoad);
+            }
+            else {
+                this.reload();
+            }
+        }
+
         public reload() {
             // If a scene file has been provided
             if (this._sceneFileToLoad) {