David Catuhe 8 年之前
父节点
当前提交
7b9a5f8bbc

文件差异内容过多而无法显示
+ 1140 - 1139
dist/preview release/babylon.d.ts


文件差异内容过多而无法显示
+ 32 - 32
dist/preview release/babylon.js


+ 42 - 30
dist/preview release/babylon.max.js

@@ -4884,6 +4884,37 @@ var BABYLON;
 (function (BABYLON) {
     var __decoratorInitialStore = {};
     var __mergedStore = {};
+    var _copySource = function (creationFunction, source, instanciate) {
+        var destination = creationFunction();
+        // Tags
+        if (BABYLON.Tags) {
+            BABYLON.Tags.AddTagsTo(destination, source.tags);
+        }
+        var classStore = getMergedStore(destination);
+        // Properties
+        for (var property in classStore) {
+            var propertyDescriptor = classStore[property];
+            var sourceProperty = source[property];
+            var propertyType = propertyDescriptor.type;
+            if (sourceProperty !== undefined && sourceProperty !== null) {
+                switch (propertyType) {
+                    case 0: // Value
+                    case 6:
+                        destination[property] = sourceProperty;
+                        break;
+                    case 1: // Texture
+                    case 2: // Color3
+                    case 3: // FresnelParameters
+                    case 4: // Vector2
+                    case 5: // Vector3
+                    case 7:
+                        destination[property] = instanciate ? sourceProperty : sourceProperty.clone();
+                        break;
+                }
+            }
+        }
+        return destination;
+    };
     function getDirectStore(target) {
         var classKey = target.getClassName();
         if (!__decoratorInitialStore[classKey]) {
@@ -5106,35 +5137,10 @@ var BABYLON;
             return destination;
         };
         SerializationHelper.Clone = function (creationFunction, source) {
-            var destination = creationFunction();
-            // Tags
-            if (BABYLON.Tags) {
-                BABYLON.Tags.AddTagsTo(destination, source.tags);
-            }
-            var classStore = getMergedStore(destination);
-            // Properties
-            for (var property in classStore) {
-                var propertyDescriptor = classStore[property];
-                var sourceProperty = source[property];
-                var propertyType = propertyDescriptor.type;
-                if (sourceProperty !== undefined && sourceProperty !== null) {
-                    switch (propertyType) {
-                        case 0: // Value
-                        case 6:
-                            destination[property] = sourceProperty;
-                            break;
-                        case 1: // Texture
-                        case 2: // Color3
-                        case 3: // FresnelParameters
-                        case 4: // Vector2
-                        case 5: // Vector3
-                        case 7:
-                            destination[property] = sourceProperty.clone();
-                            break;
-                    }
-                }
-            }
-            return destination;
+            return _copySource(creationFunction, source, false);
+        };
+        SerializationHelper.Instanciate = function (creationFunction, source) {
+            return _copySource(creationFunction, source, true);
         };
         return SerializationHelper;
     }());
@@ -24903,6 +24909,9 @@ var BABYLON;
             var scene = this.getScene();
             var engine = scene.getEngine();
             var checkReady = function () {
+                if (!_this._scene || !_this._scene.getEngine()) {
+                    return;
+                }
                 if (subMesh._materialDefines) {
                     subMesh._materialDefines._renderId = -1;
                 }
@@ -46500,8 +46509,11 @@ var BABYLON;
                 subMeshes.push.apply(subMeshes, mesh.subMeshes);
             }
             var checkReady = function () {
+                if (!_this._scene || !_this._scene.getEngine()) {
+                    return;
+                }
                 var subMesh = subMeshes[currentIndex];
-                if (_this._scene && _this._scene.getEngine() && _this.isReady(subMesh, options ? options.useInstances : false)) {
+                if (_this.isReady(subMesh, options ? options.useInstances : false)) {
                     currentIndex++;
                     if (currentIndex >= subMeshes.length) {
                         if (onCompiled) {

文件差异内容过多而无法显示
+ 1140 - 1139
dist/preview release/babylon.module.d.ts


文件差异内容过多而无法显示
+ 32 - 32
dist/preview release/babylon.worker.js


文件差异内容过多而无法显示
+ 4199 - 4198
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


文件差异内容过多而无法显示
+ 26 - 26
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


+ 36 - 30
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js

@@ -4884,6 +4884,37 @@ var BABYLON;
 (function (BABYLON) {
     var __decoratorInitialStore = {};
     var __mergedStore = {};
+    var _copySource = function (creationFunction, source, instanciate) {
+        var destination = creationFunction();
+        // Tags
+        if (BABYLON.Tags) {
+            BABYLON.Tags.AddTagsTo(destination, source.tags);
+        }
+        var classStore = getMergedStore(destination);
+        // Properties
+        for (var property in classStore) {
+            var propertyDescriptor = classStore[property];
+            var sourceProperty = source[property];
+            var propertyType = propertyDescriptor.type;
+            if (sourceProperty !== undefined && sourceProperty !== null) {
+                switch (propertyType) {
+                    case 0: // Value
+                    case 6:
+                        destination[property] = sourceProperty;
+                        break;
+                    case 1: // Texture
+                    case 2: // Color3
+                    case 3: // FresnelParameters
+                    case 4: // Vector2
+                    case 5: // Vector3
+                    case 7:
+                        destination[property] = instanciate ? sourceProperty : sourceProperty.clone();
+                        break;
+                }
+            }
+        }
+        return destination;
+    };
     function getDirectStore(target) {
         var classKey = target.getClassName();
         if (!__decoratorInitialStore[classKey]) {
@@ -5106,35 +5137,10 @@ var BABYLON;
             return destination;
         };
         SerializationHelper.Clone = function (creationFunction, source) {
-            var destination = creationFunction();
-            // Tags
-            if (BABYLON.Tags) {
-                BABYLON.Tags.AddTagsTo(destination, source.tags);
-            }
-            var classStore = getMergedStore(destination);
-            // Properties
-            for (var property in classStore) {
-                var propertyDescriptor = classStore[property];
-                var sourceProperty = source[property];
-                var propertyType = propertyDescriptor.type;
-                if (sourceProperty !== undefined && sourceProperty !== null) {
-                    switch (propertyType) {
-                        case 0: // Value
-                        case 6:
-                            destination[property] = sourceProperty;
-                            break;
-                        case 1: // Texture
-                        case 2: // Color3
-                        case 3: // FresnelParameters
-                        case 4: // Vector2
-                        case 5: // Vector3
-                        case 7:
-                            destination[property] = sourceProperty.clone();
-                            break;
-                    }
-                }
-            }
-            return destination;
+            return _copySource(creationFunction, source, false);
+        };
+        SerializationHelper.Instanciate = function (creationFunction, source) {
+            return _copySource(creationFunction, source, true);
         };
         return SerializationHelper;
     }());
@@ -28606,7 +28612,7 @@ var BABYLON;
             var size = matricesWeights.length;
             for (var i = 0; i < size; i += influencers) {
                 var weight = 0;
-                var biggerIndex = 0;
+                var biggerIndex = i;
                 var biggerWeight = 0;
                 for (var j = 0; j < influencers - 1; j++) {
                     weight += matricesWeights[i + j];

文件差异内容过多而无法显示
+ 4199 - 4198
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/loaders/babylon.objFileLoader.min.js