David Catuhe 8 年之前
父节点
当前提交
6b71447aac

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


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


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


+ 218 - 7
dist/preview release/babylon.max.js

@@ -23434,6 +23434,12 @@ var BABYLON;
                     if (parsedTexture.base64String) {
                     if (parsedTexture.base64String) {
                         texture = Texture.CreateFromBase64String(parsedTexture.base64String, parsedTexture.name, scene);
                         texture = Texture.CreateFromBase64String(parsedTexture.base64String, parsedTexture.name, scene);
                     }
                     }
+                    else if (parsedTexture.name instanceof Array) {
+                        for (var i = 0, len = parsedTexture.name.length; i < len; i++) {
+                            parsedTexture.name[i] = rootUrl + parsedTexture.name[i];
+                        }
+                        texture = new Texture(parsedTexture.name, scene);
+                    }
                     else {
                     else {
                         texture = new Texture(rootUrl + parsedTexture.name, scene);
                         texture = new Texture(rootUrl + parsedTexture.name, scene);
                     }
                     }
@@ -29774,6 +29780,7 @@ var BABYLON;
             this._scaleMatrix = BABYLON.Matrix.Identity();
             this._scaleMatrix = BABYLON.Matrix.Identity();
             this._scaleVector = new BABYLON.Vector3(1, 1, 1);
             this._scaleVector = new BABYLON.Vector3(1, 1, 1);
             this._negateScaleChildren = new BABYLON.Vector3(1, 1, 1);
             this._negateScaleChildren = new BABYLON.Vector3(1, 1, 1);
+            this._scalingDeterminant = 1;
             this._syncScaleVector = function () {
             this._syncScaleVector = function () {
                 var lm = this.getLocalMatrix();
                 var lm = this.getLocalMatrix();
                 var xsq = (lm.m[0] * lm.m[0] + lm.m[1] * lm.m[1] + lm.m[2] * lm.m[2]);
                 var xsq = (lm.m[0] * lm.m[0] + lm.m[1] * lm.m[1] + lm.m[2] * lm.m[2]);
@@ -29790,6 +29797,7 @@ var BABYLON;
                     this._scaleVector.y /= this._parent._negateScaleChildren.y;
                     this._scaleVector.y /= this._parent._negateScaleChildren.y;
                     this._scaleVector.z /= this._parent._negateScaleChildren.z;
                     this._scaleVector.z /= this._parent._negateScaleChildren.z;
                 }
                 }
+                BABYLON.Matrix.FromValuesToRef(this._scaleVector.x, 0, 0, 0, 0, this._scaleVector.y, 0, 0, 0, 0, this._scaleVector.z, 0, 0, 0, 0, 1, this._scaleMatrix);
             };
             };
             this._skeleton = skeleton;
             this._skeleton = skeleton;
             this._matrix = matrix;
             this._matrix = matrix;
@@ -29804,6 +29812,9 @@ var BABYLON;
                 this._parent = null;
                 this._parent = null;
             }
             }
             this._updateDifferenceMatrix();
             this._updateDifferenceMatrix();
+            if (this.getAbsoluteTransform().determinant() < 0) {
+                this._scalingDeterminant *= -1;
+            }
         }
         }
         // Members
         // Members
         Bone.prototype.getParent = function () {
         Bone.prototype.getParent = function () {
@@ -30036,10 +30047,12 @@ var BABYLON;
         Bone.prototype.setRotationMatrix = function (rotMat, space, mesh) {
         Bone.prototype.setRotationMatrix = function (rotMat, space, mesh) {
             if (space === void 0) { space = BABYLON.Space.LOCAL; }
             if (space === void 0) { space = BABYLON.Space.LOCAL; }
             if (mesh === void 0) { mesh = null; }
             if (mesh === void 0) { mesh = null; }
-            var rotMatInv = BABYLON.Tmp.Matrix[1];
+            var rotMatInv = BABYLON.Tmp.Matrix[0];
             this._getNegativeRotationToRef(rotMatInv, space, mesh);
             this._getNegativeRotationToRef(rotMatInv, space, mesh);
-            rotMatInv.multiplyToRef(rotMat, rotMat);
-            this._rotateWithMatrix(rotMat, space, mesh);
+            var rotMat2 = BABYLON.Tmp.Matrix[1];
+            rotMat2.copyFrom(rotMat);
+            rotMatInv.multiplyToRef(rotMat, rotMat2);
+            this._rotateWithMatrix(rotMat2, space, mesh);
         };
         };
         Bone.prototype._rotateWithMatrix = function (rmat, space, mesh) {
         Bone.prototype._rotateWithMatrix = function (rmat, space, mesh) {
             if (space === void 0) { space = BABYLON.Space.LOCAL; }
             if (space === void 0) { space = BABYLON.Space.LOCAL; }
@@ -30103,7 +30116,7 @@ var BABYLON;
                     scaleMatrix.multiplyToRef(meshScale, scaleMatrix);
                     scaleMatrix.multiplyToRef(meshScale, scaleMatrix);
                 }
                 }
                 rotMatInv.invert();
                 rotMatInv.invert();
-                scaleMatrix.m[0] *= -1;
+                scaleMatrix.m[0] *= this._scalingDeterminant;
                 rotMatInv.multiplyToRef(scaleMatrix, rotMatInv);
                 rotMatInv.multiplyToRef(scaleMatrix, rotMatInv);
             }
             }
             else {
             else {
@@ -30118,7 +30131,7 @@ var BABYLON;
                     pscaleMatrix.multiplyToRef(rotMatInv, rotMatInv);
                     pscaleMatrix.multiplyToRef(rotMatInv, rotMatInv);
                 }
                 }
                 else {
                 else {
-                    scaleMatrix.m[0] *= -1;
+                    scaleMatrix.m[0] *= this._scalingDeterminant;
                 }
                 }
                 rotMatInv.multiplyToRef(scaleMatrix, rotMatInv);
                 rotMatInv.multiplyToRef(scaleMatrix, rotMatInv);
             }
             }
@@ -30180,9 +30193,14 @@ var BABYLON;
                 mat.multiplyToRef(mesh.getWorldMatrix(), mat);
                 mat.multiplyToRef(mesh.getWorldMatrix(), mat);
             }
             }
             BABYLON.Vector3.TransformNormalToRef(localAxis, mat, result);
             BABYLON.Vector3.TransformNormalToRef(localAxis, mat, result);
-            if (this._scaleVector.x != 1 || this._scaleVector.y != 1 || this._scaleVector.z != 1) {
-                result.normalize();
+            if (mesh) {
+                result.x /= mesh.scaling.x;
+                result.y /= mesh.scaling.y;
+                result.z /= mesh.scaling.z;
             }
             }
+            result.x /= this._scaleVector.x;
+            result.y /= this._scaleVector.y;
+            result.z /= this._scaleVector.z;
         };
         };
         Bone.prototype.getRotation = function (mesh) {
         Bone.prototype.getRotation = function (mesh) {
             var result = BABYLON.Quaternion.Identity();
             var result = BABYLON.Quaternion.Identity();
@@ -30203,6 +30221,199 @@ var BABYLON;
 
 
 var BABYLON;
 var BABYLON;
 (function (BABYLON) {
 (function (BABYLON) {
+    var BoneIKController = (function () {
+        function BoneIKController(mesh, bone, target, poleTarget, poleAngle) {
+            if (poleAngle === void 0) { poleAngle = 0; }
+            this.poleAngle = 0;
+            this._maxAngle = Math.PI;
+            this._tmpVec1 = BABYLON.Vector3.Zero();
+            this._tmpVec2 = BABYLON.Vector3.Zero();
+            this._tmpVec3 = BABYLON.Vector3.Zero();
+            this._tmpVec4 = BABYLON.Vector3.Zero();
+            this._tmpVec5 = BABYLON.Vector3.Zero();
+            this._tmpMat1 = BABYLON.Matrix.Identity();
+            this._tmpMat2 = BABYLON.Matrix.Identity();
+            this._rightHandedSystem = false;
+            target.computeWorldMatrix(true);
+            poleTarget.computeWorldMatrix(true);
+            this._bone2 = bone;
+            this._bone1 = bone.getParent();
+            this.target = target;
+            this.poleTarget = poleTarget;
+            this.poleAngle = poleAngle;
+            this.mesh = mesh;
+            if (bone.getAbsoluteTransform().determinant() > 0) {
+                this._rightHandedSystem = true;
+            }
+            if (this._bone1.length) {
+                var boneScale1 = this._bone1.getScale();
+                var boneScale2 = this._bone2.getScale();
+                this._bone1Length = this._bone1.length * boneScale1.y;
+                this._bone2Length = this._bone2.length * boneScale2.y;
+            }
+            else if (this._bone1.children[0]) {
+                mesh.computeWorldMatrix(true);
+                var pos1 = this._bone2.children[0].getAbsolutePosition(mesh);
+                var pos2 = this._bone2.getAbsolutePosition(mesh);
+                var pos3 = this._bone1.getAbsolutePosition(mesh);
+                this._bone1Length = BABYLON.Vector3.Distance(pos1, pos2);
+                this._bone2Length = BABYLON.Vector3.Distance(pos2, pos3);
+            }
+            this.maxAngle = Math.PI;
+        }
+        Object.defineProperty(BoneIKController.prototype, "maxAngle", {
+            get: function () {
+                return this._maxAngle;
+            },
+            set: function (value) {
+                this._setMaxAngle(value);
+            },
+            enumerable: true,
+            configurable: true
+        });
+        BoneIKController.prototype._setMaxAngle = function (ang) {
+            if (ang < 0) {
+                ang = 0;
+            }
+            if (ang > Math.PI || ang == undefined) {
+                ang = Math.PI;
+            }
+            this._maxAngle = ang;
+            var a = this._bone1Length;
+            var b = this._bone2Length;
+            this._maxReach = Math.sqrt(a * a + b * b - 2 * a * b * Math.cos(ang));
+        };
+        BoneIKController.prototype.update = function () {
+            var bone1 = this._bone1;
+            var target = this.target.getAbsolutePosition();
+            var poleTarget = this.poleTarget.getAbsolutePosition();
+            var bonePos = this._tmpVec1;
+            var zaxis = this._tmpVec2;
+            var xaxis = this._tmpVec3;
+            var yaxis = this._tmpVec4;
+            var upAxis = this._tmpVec5;
+            var mat1 = this._tmpMat1;
+            var mat2 = this._tmpMat2;
+            bone1.getAbsolutePositionToRef(this.mesh, bonePos);
+            poleTarget.subtractToRef(bonePos, upAxis);
+            if (upAxis.x == 0 && upAxis.y == 0 && upAxis.z == 0) {
+                upAxis.y = 1;
+            }
+            else {
+                upAxis.normalize();
+            }
+            target.subtractToRef(bonePos, yaxis);
+            yaxis.normalize();
+            BABYLON.Vector3.CrossToRef(yaxis, upAxis, zaxis);
+            zaxis.normalize();
+            BABYLON.Vector3.CrossToRef(yaxis, zaxis, xaxis);
+            xaxis.normalize();
+            BABYLON.Matrix.FromXYZAxesToRef(xaxis, yaxis, zaxis, mat1);
+            var a = this._bone1Length;
+            var b = this._bone2Length;
+            var c = BABYLON.Vector3.Distance(bonePos, target);
+            if (this._maxReach > 0) {
+                c = Math.min(this._maxReach, c);
+            }
+            var acosa = (b * b + c * c - a * a) / (2 * b * c);
+            var acosb = (c * c + a * a - b * b) / (2 * c * a);
+            if (acosa > 1) {
+                acosa = 1;
+            }
+            if (acosb > 1) {
+                acosb = 1;
+            }
+            if (acosa < -1) {
+                acosa = -1;
+            }
+            if (acosb < -1) {
+                acosb = -1;
+            }
+            var angA = Math.acos(acosa);
+            var angB = Math.acos(acosb);
+            var angC = -angA - angB;
+            var bendAxis = this._tmpVec1;
+            bendAxis.x = 0;
+            bendAxis.y = 0;
+            bendAxis.z = 0;
+            if (this._rightHandedSystem) {
+                bendAxis.z = 1;
+                BABYLON.Matrix.RotationYawPitchRollToRef(0, 0, angB + Math.PI * .5, mat2);
+                mat2.multiplyToRef(mat1, mat1);
+                BABYLON.Matrix.RotationAxisToRef(yaxis, this.poleAngle + Math.PI, mat2);
+                mat1.multiplyToRef(mat2, mat1);
+            }
+            else {
+                bendAxis.x = 1;
+                BABYLON.Matrix.RotationYawPitchRollToRef(0, angB, 0, mat2);
+                mat2.multiplyToRef(mat1, mat1);
+                if (this.poleAngle) {
+                    BABYLON.Matrix.RotationAxisToRef(yaxis, this.poleAngle, mat2);
+                    mat1.multiplyToRef(mat2, mat1);
+                }
+            }
+            this._bone1.setRotationMatrix(mat1, BABYLON.Space.WORLD, this.mesh);
+            this._bone2.setAxisAngle(bendAxis, angC, BABYLON.Space.LOCAL);
+        };
+        return BoneIKController;
+    }());
+    BABYLON.BoneIKController = BoneIKController;
+})(BABYLON || (BABYLON = {}));
+
+var BABYLON;
+(function (BABYLON) {
+    var BoneLookController = (function () {
+        function BoneLookController(mesh, bone, target, adjustYaw, adjustPitch, adjustRoll) {
+            if (adjustYaw === void 0) { adjustYaw = 0; }
+            if (adjustPitch === void 0) { adjustPitch = 0; }
+            if (adjustRoll === void 0) { adjustRoll = 0; }
+            this.upAxis = BABYLON.Vector3.Up();
+            this.adjustYaw = 0;
+            this.adjustPitch = 0;
+            this.adjustRoll = 0;
+            this._tmpVec1 = BABYLON.Vector3.Zero();
+            this._tmpVec2 = BABYLON.Vector3.Zero();
+            this._tmpVec3 = BABYLON.Vector3.Zero();
+            this._tmpVec4 = BABYLON.Vector3.Zero();
+            this._tmpMat1 = BABYLON.Matrix.Identity();
+            this._tmpMat2 = BABYLON.Matrix.Identity();
+            this.mesh = mesh;
+            this.bone = bone;
+            this.target = target;
+            this.adjustYaw = adjustYaw;
+            this.adjustPitch = adjustPitch;
+            this.adjustRoll = adjustRoll;
+        }
+        BoneLookController.prototype.update = function () {
+            var bone = this.bone;
+            var target = this.target;
+            var bonePos = this._tmpVec1;
+            var zaxis = this._tmpVec2;
+            var xaxis = this._tmpVec3;
+            var yaxis = this._tmpVec4;
+            var mat1 = this._tmpMat1;
+            var mat2 = this._tmpMat2;
+            bone.getAbsolutePositionToRef(this.mesh, bonePos);
+            target.subtractToRef(bonePos, zaxis);
+            zaxis.normalize();
+            BABYLON.Vector3.CrossToRef(this.upAxis, zaxis, xaxis);
+            xaxis.normalize();
+            BABYLON.Vector3.CrossToRef(zaxis, xaxis, yaxis);
+            yaxis.normalize();
+            BABYLON.Matrix.FromXYZAxesToRef(xaxis, yaxis, zaxis, mat1);
+            if (this.adjustYaw || this.adjustPitch || this.adjustRoll) {
+                BABYLON.Matrix.RotationYawPitchRollToRef(this.adjustYaw, this.adjustPitch, this.adjustRoll, mat2);
+                mat2.multiplyToRef(mat1, mat1);
+            }
+            this.bone.setRotationMatrix(mat1, BABYLON.Space.WORLD, this.mesh);
+        };
+        return BoneLookController;
+    }());
+    BABYLON.BoneLookController = BoneLookController;
+})(BABYLON || (BABYLON = {}));
+
+var BABYLON;
+(function (BABYLON) {
     var Skeleton = (function () {
     var Skeleton = (function () {
         function Skeleton(name, id, scene) {
         function Skeleton(name, id, scene) {
             this.name = name;
             this.name = name;

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


+ 1 - 1
dist/preview release/what's new.md

@@ -6,9 +6,9 @@
 - Babylon.js now supports right handed system with ```scene.useRightHandedSystem = true``` ([deltakosh](https://github.com/deltakosh))
 - Babylon.js now supports right handed system with ```scene.useRightHandedSystem = true``` ([deltakosh](https://github.com/deltakosh))
 - Babylon.js is now compiled with [optimize-js](https://github.com/nolanlawson/optimize-js) to get faster initial load ([deltakosh](https://github.com/deltakosh))
 - Babylon.js is now compiled with [optimize-js](https://github.com/nolanlawson/optimize-js) to get faster initial load ([deltakosh](https://github.com/deltakosh))
 - Canvas2D moved to a separate folder in main repo. Now you need to also include babylon.cavans2d.js to get Canvas@D feature ([deltakosh](https://github.com/deltakosh))
 - Canvas2D moved to a separate folder in main repo. Now you need to also include babylon.cavans2d.js to get Canvas@D feature ([deltakosh](https://github.com/deltakosh))
+- Added BoneIKController and BoneLookController ([abow](https://github.com/abow))
 
 
 ### Updates
 ### Updates
-- Added BoneIKController and BoneLookController ([abow](https://github.com/abow))
 - You can now specify an array of string when loading a texture (they will be considered as fallbacks) ([deltakosh](https://github.com/deltakosh))
 - You can now specify an array of string when loading a texture (they will be considered as fallbacks) ([deltakosh](https://github.com/deltakosh))
 - Added Bone.getAbsolutePosition and Bone.getAbsolutePositionToRef ([abow](https://github.com/abow))
 - Added Bone.getAbsolutePosition and Bone.getAbsolutePositionToRef ([abow](https://github.com/abow))
 - Added Bone.setYawPitchRoll ([abow](https://github.com/abow))
 - Added Bone.setYawPitchRoll ([abow](https://github.com/abow))

+ 19 - 7
src/Bones/babylon.bone.js

@@ -18,6 +18,7 @@ var BABYLON;
             this._scaleMatrix = BABYLON.Matrix.Identity();
             this._scaleMatrix = BABYLON.Matrix.Identity();
             this._scaleVector = new BABYLON.Vector3(1, 1, 1);
             this._scaleVector = new BABYLON.Vector3(1, 1, 1);
             this._negateScaleChildren = new BABYLON.Vector3(1, 1, 1);
             this._negateScaleChildren = new BABYLON.Vector3(1, 1, 1);
+            this._scalingDeterminant = 1;
             this._syncScaleVector = function () {
             this._syncScaleVector = function () {
                 var lm = this.getLocalMatrix();
                 var lm = this.getLocalMatrix();
                 var xsq = (lm.m[0] * lm.m[0] + lm.m[1] * lm.m[1] + lm.m[2] * lm.m[2]);
                 var xsq = (lm.m[0] * lm.m[0] + lm.m[1] * lm.m[1] + lm.m[2] * lm.m[2]);
@@ -34,6 +35,7 @@ var BABYLON;
                     this._scaleVector.y /= this._parent._negateScaleChildren.y;
                     this._scaleVector.y /= this._parent._negateScaleChildren.y;
                     this._scaleVector.z /= this._parent._negateScaleChildren.z;
                     this._scaleVector.z /= this._parent._negateScaleChildren.z;
                 }
                 }
+                BABYLON.Matrix.FromValuesToRef(this._scaleVector.x, 0, 0, 0, 0, this._scaleVector.y, 0, 0, 0, 0, this._scaleVector.z, 0, 0, 0, 0, 1, this._scaleMatrix);
             };
             };
             this._skeleton = skeleton;
             this._skeleton = skeleton;
             this._matrix = matrix;
             this._matrix = matrix;
@@ -48,6 +50,9 @@ var BABYLON;
                 this._parent = null;
                 this._parent = null;
             }
             }
             this._updateDifferenceMatrix();
             this._updateDifferenceMatrix();
+            if (this.getAbsoluteTransform().determinant() < 0) {
+                this._scalingDeterminant *= -1;
+            }
         }
         }
         // Members
         // Members
         Bone.prototype.getParent = function () {
         Bone.prototype.getParent = function () {
@@ -280,10 +285,12 @@ var BABYLON;
         Bone.prototype.setRotationMatrix = function (rotMat, space, mesh) {
         Bone.prototype.setRotationMatrix = function (rotMat, space, mesh) {
             if (space === void 0) { space = BABYLON.Space.LOCAL; }
             if (space === void 0) { space = BABYLON.Space.LOCAL; }
             if (mesh === void 0) { mesh = null; }
             if (mesh === void 0) { mesh = null; }
-            var rotMatInv = BABYLON.Tmp.Matrix[1];
+            var rotMatInv = BABYLON.Tmp.Matrix[0];
             this._getNegativeRotationToRef(rotMatInv, space, mesh);
             this._getNegativeRotationToRef(rotMatInv, space, mesh);
-            rotMatInv.multiplyToRef(rotMat, rotMat);
-            this._rotateWithMatrix(rotMat, space, mesh);
+            var rotMat2 = BABYLON.Tmp.Matrix[1];
+            rotMat2.copyFrom(rotMat);
+            rotMatInv.multiplyToRef(rotMat, rotMat2);
+            this._rotateWithMatrix(rotMat2, space, mesh);
         };
         };
         Bone.prototype._rotateWithMatrix = function (rmat, space, mesh) {
         Bone.prototype._rotateWithMatrix = function (rmat, space, mesh) {
             if (space === void 0) { space = BABYLON.Space.LOCAL; }
             if (space === void 0) { space = BABYLON.Space.LOCAL; }
@@ -347,7 +354,7 @@ var BABYLON;
                     scaleMatrix.multiplyToRef(meshScale, scaleMatrix);
                     scaleMatrix.multiplyToRef(meshScale, scaleMatrix);
                 }
                 }
                 rotMatInv.invert();
                 rotMatInv.invert();
-                scaleMatrix.m[0] *= -1;
+                scaleMatrix.m[0] *= this._scalingDeterminant;
                 rotMatInv.multiplyToRef(scaleMatrix, rotMatInv);
                 rotMatInv.multiplyToRef(scaleMatrix, rotMatInv);
             }
             }
             else {
             else {
@@ -362,7 +369,7 @@ var BABYLON;
                     pscaleMatrix.multiplyToRef(rotMatInv, rotMatInv);
                     pscaleMatrix.multiplyToRef(rotMatInv, rotMatInv);
                 }
                 }
                 else {
                 else {
-                    scaleMatrix.m[0] *= -1;
+                    scaleMatrix.m[0] *= this._scalingDeterminant;
                 }
                 }
                 rotMatInv.multiplyToRef(scaleMatrix, rotMatInv);
                 rotMatInv.multiplyToRef(scaleMatrix, rotMatInv);
             }
             }
@@ -424,9 +431,14 @@ var BABYLON;
                 mat.multiplyToRef(mesh.getWorldMatrix(), mat);
                 mat.multiplyToRef(mesh.getWorldMatrix(), mat);
             }
             }
             BABYLON.Vector3.TransformNormalToRef(localAxis, mat, result);
             BABYLON.Vector3.TransformNormalToRef(localAxis, mat, result);
-            if (this._scaleVector.x != 1 || this._scaleVector.y != 1 || this._scaleVector.z != 1) {
-                result.normalize();
+            if (mesh) {
+                result.x /= mesh.scaling.x;
+                result.y /= mesh.scaling.y;
+                result.z /= mesh.scaling.z;
             }
             }
+            result.x /= this._scaleVector.x;
+            result.y /= this._scaleVector.y;
+            result.z /= this._scaleVector.z;
         };
         };
         Bone.prototype.getRotation = function (mesh) {
         Bone.prototype.getRotation = function (mesh) {
             var result = BABYLON.Quaternion.Identity();
             var result = BABYLON.Quaternion.Identity();

+ 6 - 0
src/Materials/Textures/babylon.texture.js

@@ -242,6 +242,12 @@ var BABYLON;
                     if (parsedTexture.base64String) {
                     if (parsedTexture.base64String) {
                         texture = Texture.CreateFromBase64String(parsedTexture.base64String, parsedTexture.name, scene);
                         texture = Texture.CreateFromBase64String(parsedTexture.base64String, parsedTexture.name, scene);
                     }
                     }
+                    else if (parsedTexture.name instanceof Array) {
+                        for (var i = 0, len = parsedTexture.name.length; i < len; i++) {
+                            parsedTexture.name[i] = rootUrl + parsedTexture.name[i];
+                        }
+                        texture = new Texture(parsedTexture.name, scene);
+                    }
                     else {
                     else {
                         texture = new Texture(rootUrl + parsedTexture.name, scene);
                         texture = new Texture(rootUrl + parsedTexture.name, scene);
                     }
                     }