David Catuhe 9 年之前
父節點
當前提交
4c149b336b

文件差異過大導致無法顯示
+ 6 - 6
dist/preview release/babylon.core.js


文件差異過大導致無法顯示
+ 2130 - 2125
dist/preview release/babylon.d.ts


文件差異過大導致無法顯示
+ 21 - 21
dist/preview release/babylon.js


+ 74 - 17
dist/preview release/babylon.max.js

@@ -3776,7 +3776,7 @@ var BABYLON;
                                 try {
                                     //backwards compatibility with ts 1.0, srcElement doesn't have an "error" according to ts 1.3
                                     if (event.srcElement['error'] && event.srcElement['error'].name === "QuotaExceededError") {
-                                        this.hasReachedQuota = true;
+                                        _this.hasReachedQuota = true;
                                     }
                                 }
                                 catch (ex) { }
@@ -3998,7 +3998,7 @@ var BABYLON;
                                 try {
                                     //backwards compatibility with ts 1.0, srcElement doesn't have an "error" according to ts 1.3
                                     if (event.srcElement['error'] && event.srcElement['error'].name === "QuotaExceededError") {
-                                        this.hasReachedQuota = true;
+                                        _this.hasReachedQuota = true;
                                     }
                                 }
                                 catch (ex) { }
@@ -30589,6 +30589,9 @@ var BABYLON;
             get: function () {
                 return this._parent;
             },
+            set: function (value) {
+                this._parent = value;
+            },
             enumerable: true,
             configurable: true
         });
@@ -39125,7 +39128,7 @@ var BABYLON;
                     var layoutArea = void 0;
                     if (child._hasMargin) {
                         child.margin.computeWithAlignment(prim.layoutArea, child.actualSize, child.marginAlignment, StackPanelLayoutEngine.dstOffset, StackPanelLayoutEngine.dstArea, true);
-                        layoutArea = StackPanelLayoutEngine.dstArea;
+                        layoutArea = StackPanelLayoutEngine.dstArea.clone();
                         child.layoutArea = layoutArea;
                     }
                     else {
@@ -42533,7 +42536,7 @@ var BABYLON;
                 var local;
                 var pos = this._position ? this.position : this.layoutAreaPos;
                 if (this._origin.x === 0 && this._origin.y === 0) {
-                    local = BABYLON.Matrix.Compose(new BABYLON.Vector3(this._scale.x, this._scale.y, 1), rot, new BABYLON.Vector3(pos.x, pos.y, 0));
+                    local = BABYLON.Matrix.Compose(new BABYLON.Vector3(this._scale.x, this._scale.y, 1), rot, new BABYLON.Vector3(pos.x + this._marginOffset.x, pos.y + this._marginOffset.y, 0));
                     this._localTransform = local;
                 }
                 else {
@@ -42547,7 +42550,7 @@ var BABYLON;
                     BABYLON.Matrix.ScalingToRef(this._scale.x, this._scale.y, 1, Prim2DBase._t0);
                     Prim2DBase._t2.multiplyToRef(Prim2DBase._t0, Prim2DBase._t1);
                     // -Origin * rotation * scale * (Origin + Position)
-                    BABYLON.Matrix.TranslationToRef((as.width * this._origin.x) + pos.x, (as.height * this._origin.y) + pos.y, 0, Prim2DBase._t2);
+                    BABYLON.Matrix.TranslationToRef((as.width * this._origin.x) + pos.x + this._marginOffset.x, (as.height * this._origin.y) + pos.y + this._marginOffset.y, 0, Prim2DBase._t2);
                     Prim2DBase._t1.multiplyToRef(Prim2DBase._t2, this._localTransform);
                 }
                 this.clearPropertiesDirty(tflags);
@@ -42635,8 +42638,8 @@ var BABYLON;
                     var globalTransform = this._parent ? this._parent._globalTransform : null;
                     var localTransform = void 0;
                     Prim2DBase._transMtx.copyFrom(this._localTransform);
-                    Prim2DBase._transMtx.m[12] += this._marginOffset.x + parentPaddingOffset.x;
-                    Prim2DBase._transMtx.m[13] += this._marginOffset.y + parentPaddingOffset.y;
+                    Prim2DBase._transMtx.m[12] += parentPaddingOffset.x;
+                    Prim2DBase._transMtx.m[13] += parentPaddingOffset.y;
                     localTransform = Prim2DBase._transMtx;
                     this._globalTransform = this._parent ? localTransform.multiply(globalTransform) : localTransform.clone();
                     this._invGlobalTransform = BABYLON.Matrix.Invert(this._globalTransform);
@@ -43555,6 +43558,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -43562,6 +43567,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -43569,6 +43576,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -43576,6 +43585,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -44390,6 +44401,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -44397,6 +44410,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -44404,6 +44419,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -44411,6 +44428,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -44419,6 +44438,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -44426,6 +44447,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -44433,6 +44456,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -44440,6 +44465,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -44447,6 +44474,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -45564,6 +45593,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -46011,6 +46042,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -46311,6 +46344,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -46318,6 +46353,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -46325,6 +46362,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -46332,6 +46371,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -46343,6 +46384,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -46780,6 +46823,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -46787,6 +46832,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -46794,6 +46841,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -46801,6 +46850,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -46808,6 +46859,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -47281,6 +47334,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -47288,6 +47343,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -50944,7 +51001,7 @@ var BABYLON;
                     world: this.world
                 };
                 var impostors = [impostor];
-                function addToArray(parent) {
+                var addToArray = function (parent) {
                     if (!parent.getChildMeshes)
                         return;
                     parent.getChildMeshes().forEach(function (m) {
@@ -50953,11 +51010,11 @@ var BABYLON;
                             m.physicsImpostor._init();
                         }
                     });
-                }
+                };
                 addToArray(impostor.object);
-                function checkWithEpsilon(value) {
+                var checkWithEpsilon_1 = function (value) {
                     return Math.max(value, BABYLON.PhysicsEngine.Epsilon);
-                }
+                };
                 impostors.forEach(function (i) {
                     //get the correct bounding box
                     var oldQuaternion = i.object.rotationQuaternion;
@@ -50997,7 +51054,7 @@ var BABYLON;
                             var radiusX = extendSize.x;
                             var radiusY = extendSize.y;
                             var radiusZ = extendSize.z;
-                            var size = Math.max(checkWithEpsilon(radiusX), checkWithEpsilon(radiusY), checkWithEpsilon(radiusZ)) / 2;
+                            var size = Math.max(checkWithEpsilon_1(radiusX), checkWithEpsilon_1(radiusY), checkWithEpsilon_1(radiusZ)) / 2;
                             bodyConfig.type.push('sphere');
                             //due to the way oimo works with compounds, add 3 times
                             bodyConfig.size.push(size);
@@ -51005,8 +51062,8 @@ var BABYLON;
                             bodyConfig.size.push(size);
                             break;
                         case BABYLON.PhysicsImpostor.CylinderImpostor:
-                            var sizeX = checkWithEpsilon(extendSize.x) / 2;
-                            var sizeY = checkWithEpsilon(extendSize.y);
+                            var sizeX = checkWithEpsilon_1(extendSize.x) / 2;
+                            var sizeY = checkWithEpsilon_1(extendSize.y);
                             bodyConfig.type.push('cylinder');
                             bodyConfig.size.push(sizeX);
                             bodyConfig.size.push(sizeY);
@@ -51016,9 +51073,9 @@ var BABYLON;
                         case BABYLON.PhysicsImpostor.PlaneImpostor:
                         case BABYLON.PhysicsImpostor.BoxImpostor:
                         default:
-                            var sizeX = checkWithEpsilon(extendSize.x);
-                            var sizeY = checkWithEpsilon(extendSize.y);
-                            var sizeZ = checkWithEpsilon(extendSize.z);
+                            var sizeX = checkWithEpsilon_1(extendSize.x);
+                            var sizeY = checkWithEpsilon_1(extendSize.y);
+                            var sizeZ = checkWithEpsilon_1(extendSize.z);
                             bodyConfig.type.push('box');
                             bodyConfig.size.push(sizeX);
                             bodyConfig.size.push(sizeY);

文件差異過大導致無法顯示
+ 21 - 21
dist/preview release/babylon.noworker.js


+ 1 - 1
src/Canvas2d/babylon.canvas2dLayoutEngine.js

@@ -139,7 +139,7 @@ var BABYLON;
                     var layoutArea = void 0;
                     if (child._hasMargin) {
                         child.margin.computeWithAlignment(prim.layoutArea, child.actualSize, child.marginAlignment, StackPanelLayoutEngine.dstOffset, StackPanelLayoutEngine.dstArea, true);
-                        layoutArea = StackPanelLayoutEngine.dstArea;
+                        layoutArea = StackPanelLayoutEngine.dstArea.clone();
                         child.layoutArea = layoutArea;
                     }
                     else {

+ 2 - 0
src/Canvas2d/babylon.ellipse2d.js

@@ -146,6 +146,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });

+ 4 - 0
src/Canvas2d/babylon.lines2d.js

@@ -146,6 +146,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -153,6 +155,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });

+ 4 - 4
src/Canvas2d/babylon.prim2dBase.js

@@ -2579,7 +2579,7 @@ var BABYLON;
                 var local;
                 var pos = this._position ? this.position : this.layoutAreaPos;
                 if (this._origin.x === 0 && this._origin.y === 0) {
-                    local = BABYLON.Matrix.Compose(new BABYLON.Vector3(this._scale.x, this._scale.y, 1), rot, new BABYLON.Vector3(pos.x, pos.y, 0));
+                    local = BABYLON.Matrix.Compose(new BABYLON.Vector3(this._scale.x, this._scale.y, 1), rot, new BABYLON.Vector3(pos.x + this._marginOffset.x, pos.y + this._marginOffset.y, 0));
                     this._localTransform = local;
                 }
                 else {
@@ -2593,7 +2593,7 @@ var BABYLON;
                     BABYLON.Matrix.ScalingToRef(this._scale.x, this._scale.y, 1, Prim2DBase._t0);
                     Prim2DBase._t2.multiplyToRef(Prim2DBase._t0, Prim2DBase._t1);
                     // -Origin * rotation * scale * (Origin + Position)
-                    BABYLON.Matrix.TranslationToRef((as.width * this._origin.x) + pos.x, (as.height * this._origin.y) + pos.y, 0, Prim2DBase._t2);
+                    BABYLON.Matrix.TranslationToRef((as.width * this._origin.x) + pos.x + this._marginOffset.x, (as.height * this._origin.y) + pos.y + this._marginOffset.y, 0, Prim2DBase._t2);
                     Prim2DBase._t1.multiplyToRef(Prim2DBase._t2, this._localTransform);
                 }
                 this.clearPropertiesDirty(tflags);
@@ -2681,8 +2681,8 @@ var BABYLON;
                     var globalTransform = this._parent ? this._parent._globalTransform : null;
                     var localTransform = void 0;
                     Prim2DBase._transMtx.copyFrom(this._localTransform);
-                    Prim2DBase._transMtx.m[12] += this._marginOffset.x + parentPaddingOffset.x;
-                    Prim2DBase._transMtx.m[13] += this._marginOffset.y + parentPaddingOffset.y;
+                    Prim2DBase._transMtx.m[12] += parentPaddingOffset.x;
+                    Prim2DBase._transMtx.m[13] += parentPaddingOffset.y;
                     localTransform = Prim2DBase._transMtx;
                     this._globalTransform = this._parent ? localTransform.multiply(globalTransform) : localTransform.clone();
                     this._invGlobalTransform = BABYLON.Matrix.Invert(this._globalTransform);

+ 2 - 0
src/Canvas2d/babylon.rectangle2d.js

@@ -146,6 +146,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });

+ 8 - 0
src/Canvas2d/babylon.renderablePrim2d.js

@@ -243,6 +243,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -250,6 +252,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -257,6 +261,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -264,6 +270,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });

+ 18 - 0
src/Canvas2d/babylon.shape2d.js

@@ -197,6 +197,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -204,6 +206,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -211,6 +215,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -218,6 +224,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -226,6 +234,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -233,6 +243,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -240,6 +252,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -247,6 +261,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -254,6 +270,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });

+ 10 - 0
src/Canvas2d/babylon.sprite2d.js

@@ -97,6 +97,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -104,6 +106,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -111,6 +115,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -118,6 +124,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -129,6 +137,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });

+ 10 - 0
src/Canvas2d/babylon.text2d.js

@@ -94,6 +94,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -101,6 +103,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -108,6 +112,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -115,6 +121,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });
@@ -122,6 +130,8 @@ var BABYLON;
             get: function () {
                 return null;
             },
+            set: function (value) {
+            },
             enumerable: true,
             configurable: true
         });

+ 10 - 10
src/Physics/Plugins/babylon.oimoJSPlugin.js

@@ -79,7 +79,7 @@ var BABYLON;
                     world: this.world
                 };
                 var impostors = [impostor];
-                function addToArray(parent) {
+                var addToArray = function (parent) {
                     if (!parent.getChildMeshes)
                         return;
                     parent.getChildMeshes().forEach(function (m) {
@@ -88,11 +88,11 @@ var BABYLON;
                             m.physicsImpostor._init();
                         }
                     });
-                }
+                };
                 addToArray(impostor.object);
-                function checkWithEpsilon(value) {
+                var checkWithEpsilon_1 = function (value) {
                     return Math.max(value, BABYLON.PhysicsEngine.Epsilon);
-                }
+                };
                 impostors.forEach(function (i) {
                     //get the correct bounding box
                     var oldQuaternion = i.object.rotationQuaternion;
@@ -132,7 +132,7 @@ var BABYLON;
                             var radiusX = extendSize.x;
                             var radiusY = extendSize.y;
                             var radiusZ = extendSize.z;
-                            var size = Math.max(checkWithEpsilon(radiusX), checkWithEpsilon(radiusY), checkWithEpsilon(radiusZ)) / 2;
+                            var size = Math.max(checkWithEpsilon_1(radiusX), checkWithEpsilon_1(radiusY), checkWithEpsilon_1(radiusZ)) / 2;
                             bodyConfig.type.push('sphere');
                             //due to the way oimo works with compounds, add 3 times
                             bodyConfig.size.push(size);
@@ -140,8 +140,8 @@ var BABYLON;
                             bodyConfig.size.push(size);
                             break;
                         case BABYLON.PhysicsImpostor.CylinderImpostor:
-                            var sizeX = checkWithEpsilon(extendSize.x) / 2;
-                            var sizeY = checkWithEpsilon(extendSize.y);
+                            var sizeX = checkWithEpsilon_1(extendSize.x) / 2;
+                            var sizeY = checkWithEpsilon_1(extendSize.y);
                             bodyConfig.type.push('cylinder');
                             bodyConfig.size.push(sizeX);
                             bodyConfig.size.push(sizeY);
@@ -151,9 +151,9 @@ var BABYLON;
                         case BABYLON.PhysicsImpostor.PlaneImpostor:
                         case BABYLON.PhysicsImpostor.BoxImpostor:
                         default:
-                            var sizeX = checkWithEpsilon(extendSize.x);
-                            var sizeY = checkWithEpsilon(extendSize.y);
-                            var sizeZ = checkWithEpsilon(extendSize.z);
+                            var sizeX = checkWithEpsilon_1(extendSize.x);
+                            var sizeY = checkWithEpsilon_1(extendSize.y);
+                            var sizeZ = checkWithEpsilon_1(extendSize.z);
                             bodyConfig.type.push('box');
                             bodyConfig.size.push(sizeX);
                             bodyConfig.size.push(sizeY);

+ 3 - 0
src/Physics/babylon.physicsImpostor.js

@@ -159,6 +159,9 @@ var BABYLON;
             get: function () {
                 return this._parent;
             },
+            set: function (value) {
+                this._parent = value;
+            },
             enumerable: true,
             configurable: true
         });

+ 2 - 2
src/Tools/babylon.database.js

@@ -219,7 +219,7 @@ var BABYLON;
                                 try {
                                     //backwards compatibility with ts 1.0, srcElement doesn't have an "error" according to ts 1.3
                                     if (event.srcElement['error'] && event.srcElement['error'].name === "QuotaExceededError") {
-                                        this.hasReachedQuota = true;
+                                        _this.hasReachedQuota = true;
                                     }
                                 }
                                 catch (ex) { }
@@ -441,7 +441,7 @@ var BABYLON;
                                 try {
                                     //backwards compatibility with ts 1.0, srcElement doesn't have an "error" according to ts 1.3
                                     if (event.srcElement['error'] && event.srcElement['error'].name === "QuotaExceededError") {
-                                        this.hasReachedQuota = true;
+                                        _this.hasReachedQuota = true;
                                     }
                                 }
                                 catch (ex) { }