David Catuhe 7 anni fa
parent
commit
89edc2b71c

File diff suppressed because it is too large
+ 11806 - 11793
Playground/babylon.d.txt


File diff suppressed because it is too large
+ 16460 - 22916
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 6 - 69
dist/preview release/babylon.js


File diff suppressed because it is too large
+ 4 - 27
dist/preview release/babylon.worker.js


+ 4 - 5
dist/preview release/loaders/babylon.glTF2FileLoader.js

@@ -822,9 +822,6 @@ var BABYLON;
                     });
                     resultPromise.then(function () {
                         _this._parent._endPerformanceCounter("Loading => Ready");
-                        if (_this._rootBabylonMesh) {
-                            _this._rootBabylonMesh.setEnabled(true);
-                        }
                         BABYLON.Tools.SetImmediate(function () {
                             if (!_this._disposed) {
                                 Promise.all(_this._completePromises).then(function () {
@@ -922,7 +919,6 @@ var BABYLON;
             };
             GLTFLoader.prototype._createRootNode = function () {
                 this._rootBabylonMesh = new BABYLON.Mesh("__root__", this._babylonScene);
-                this._rootBabylonMesh.setEnabled(false);
                 var rootNode = { _babylonMesh: this._rootBabylonMesh };
                 switch (this._parent.coordinateSystemMode) {
                     case BABYLON.GLTFLoaderCoordinateSystemMode.AUTO: {
@@ -1059,6 +1055,7 @@ var BABYLON;
                 this._parent._logOpen(context + " " + (node.name || ""));
                 var babylonMesh = new BABYLON.Mesh(node.name || "node" + node._index, this._babylonScene, node._parent ? node._parent._babylonMesh : null);
                 node._babylonMesh = babylonMesh;
+                babylonMesh.setEnabled(false);
                 GLTFLoader._LoadTransform(node, babylonMesh);
                 if (node.mesh != undefined) {
                     var mesh = GLTFLoader._GetProperty(context + "/mesh", this._gltf.meshes, node.mesh);
@@ -1077,7 +1074,9 @@ var BABYLON;
                 }
                 this._parent.onMeshLoadedObservable.notifyObservers(babylonMesh);
                 this._parent._logClose();
-                return Promise.all(promises).then(function () { });
+                return Promise.all(promises).then(function () {
+                    babylonMesh.setEnabled(true);
+                });
             };
             GLTFLoader.prototype._loadMeshAsync = function (context, node, mesh, babylonMesh) {
                 var _this = this;

File diff suppressed because it is too large
+ 2 - 2
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


+ 4 - 5
dist/preview release/loaders/babylon.glTFFileLoader.js

@@ -3023,9 +3023,6 @@ var BABYLON;
                     });
                     resultPromise.then(function () {
                         _this._parent._endPerformanceCounter("Loading => Ready");
-                        if (_this._rootBabylonMesh) {
-                            _this._rootBabylonMesh.setEnabled(true);
-                        }
                         BABYLON.Tools.SetImmediate(function () {
                             if (!_this._disposed) {
                                 Promise.all(_this._completePromises).then(function () {
@@ -3123,7 +3120,6 @@ var BABYLON;
             };
             GLTFLoader.prototype._createRootNode = function () {
                 this._rootBabylonMesh = new BABYLON.Mesh("__root__", this._babylonScene);
-                this._rootBabylonMesh.setEnabled(false);
                 var rootNode = { _babylonMesh: this._rootBabylonMesh };
                 switch (this._parent.coordinateSystemMode) {
                     case BABYLON.GLTFLoaderCoordinateSystemMode.AUTO: {
@@ -3260,6 +3256,7 @@ var BABYLON;
                 this._parent._logOpen(context + " " + (node.name || ""));
                 var babylonMesh = new BABYLON.Mesh(node.name || "node" + node._index, this._babylonScene, node._parent ? node._parent._babylonMesh : null);
                 node._babylonMesh = babylonMesh;
+                babylonMesh.setEnabled(false);
                 GLTFLoader._LoadTransform(node, babylonMesh);
                 if (node.mesh != undefined) {
                     var mesh = GLTFLoader._GetProperty(context + "/mesh", this._gltf.meshes, node.mesh);
@@ -3278,7 +3275,9 @@ var BABYLON;
                 }
                 this._parent.onMeshLoadedObservable.notifyObservers(babylonMesh);
                 this._parent._logClose();
-                return Promise.all(promises).then(function () { });
+                return Promise.all(promises).then(function () {
+                    babylonMesh.setEnabled(true);
+                });
             };
             GLTFLoader.prototype._loadMeshAsync = function (context, node, mesh, babylonMesh) {
                 var _this = this;

File diff suppressed because it is too large
+ 3 - 3
dist/preview release/loaders/babylon.glTFFileLoader.min.js


+ 4 - 5
dist/preview release/loaders/babylonjs.loaders.js

@@ -4008,9 +4008,6 @@ var BABYLON;
                     });
                     resultPromise.then(function () {
                         _this._parent._endPerformanceCounter("Loading => Ready");
-                        if (_this._rootBabylonMesh) {
-                            _this._rootBabylonMesh.setEnabled(true);
-                        }
                         BABYLON.Tools.SetImmediate(function () {
                             if (!_this._disposed) {
                                 Promise.all(_this._completePromises).then(function () {
@@ -4108,7 +4105,6 @@ var BABYLON;
             };
             GLTFLoader.prototype._createRootNode = function () {
                 this._rootBabylonMesh = new BABYLON.Mesh("__root__", this._babylonScene);
-                this._rootBabylonMesh.setEnabled(false);
                 var rootNode = { _babylonMesh: this._rootBabylonMesh };
                 switch (this._parent.coordinateSystemMode) {
                     case BABYLON.GLTFLoaderCoordinateSystemMode.AUTO: {
@@ -4245,6 +4241,7 @@ var BABYLON;
                 this._parent._logOpen(context + " " + (node.name || ""));
                 var babylonMesh = new BABYLON.Mesh(node.name || "node" + node._index, this._babylonScene, node._parent ? node._parent._babylonMesh : null);
                 node._babylonMesh = babylonMesh;
+                babylonMesh.setEnabled(false);
                 GLTFLoader._LoadTransform(node, babylonMesh);
                 if (node.mesh != undefined) {
                     var mesh = GLTFLoader._GetProperty(context + "/mesh", this._gltf.meshes, node.mesh);
@@ -4263,7 +4260,9 @@ var BABYLON;
                 }
                 this._parent.onMeshLoadedObservable.notifyObservers(babylonMesh);
                 this._parent._logClose();
-                return Promise.all(promises).then(function () { });
+                return Promise.all(promises).then(function () {
+                    babylonMesh.setEnabled(true);
+                });
             };
             GLTFLoader.prototype._loadMeshAsync = function (context, node, mesh, babylonMesh) {
                 var _this = this;

File diff suppressed because it is too large
+ 3 - 3
dist/preview release/loaders/babylonjs.loaders.min.js


File diff suppressed because it is too large
+ 10 - 48
dist/preview release/viewer/babylon.viewer.js


File diff suppressed because it is too large
+ 58 - 73
dist/preview release/viewer/babylon.viewer.max.js