David Catuhe 8 năm trước cách đây
mục cha
commit
040a8ce3b4

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 7 - 7
dist/preview release/babylon.core.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 4108 - 4112
dist/preview release/babylon.d.ts


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 14 - 14
dist/preview release/babylon.js


+ 46 - 44
dist/preview release/babylon.max.js

@@ -22891,7 +22891,7 @@ var BABYLON;
         InstancedMesh.prototype.clone = function (name, newParent, doNotCloneChildren) {
             var result = this._sourceMesh.createInstance(name);
             // Deep copy
-            BABYLON.Tools.DeepCopy(this, result, ["name", "subMeshes"], []);
+            BABYLON.Tools.DeepCopy(this, result, ["name", "subMeshes", "uniqueId"], []);
             // Bounding info
             this.refreshBoundingInfo();
             // Parent
@@ -22997,7 +22997,7 @@ var BABYLON;
                     source._geometry.applyToMesh(_this);
                 }
                 // Deep copy
-                BABYLON.Tools.DeepCopy(source, _this, ["name", "material", "skeleton", "instances", "parent"], ["_poseMatrix"]);
+                BABYLON.Tools.DeepCopy(source, _this, ["name", "material", "skeleton", "instances", "parent", "uniqueId"], ["_poseMatrix"]);
                 // Parent
                 _this.parent = source.parent;
                 // Pivot
@@ -33922,7 +33922,7 @@ var BABYLON;
     var CircleEase = (function (_super) {
         __extends(CircleEase, _super);
         function CircleEase() {
-            return _super !== null && _super.apply(this, arguments) || this;
+            return _super.apply(this, arguments) || this;
         }
         CircleEase.prototype.easeInCore = function (gradient) {
             gradient = Math.max(0, Math.min(1, gradient));
@@ -33982,7 +33982,7 @@ var BABYLON;
     var CubicEase = (function (_super) {
         __extends(CubicEase, _super);
         function CubicEase() {
-            return _super !== null && _super.apply(this, arguments) || this;
+            return _super.apply(this, arguments) || this;
         }
         CubicEase.prototype.easeInCore = function (gradient) {
             return (gradient * gradient * gradient);
@@ -34050,7 +34050,7 @@ var BABYLON;
     var QuadraticEase = (function (_super) {
         __extends(QuadraticEase, _super);
         function QuadraticEase() {
-            return _super !== null && _super.apply(this, arguments) || this;
+            return _super.apply(this, arguments) || this;
         }
         QuadraticEase.prototype.easeInCore = function (gradient) {
             return (gradient * gradient);
@@ -34061,7 +34061,7 @@ var BABYLON;
     var QuarticEase = (function (_super) {
         __extends(QuarticEase, _super);
         function QuarticEase() {
-            return _super !== null && _super.apply(this, arguments) || this;
+            return _super.apply(this, arguments) || this;
         }
         QuarticEase.prototype.easeInCore = function (gradient) {
             return (gradient * gradient * gradient * gradient);
@@ -34072,7 +34072,7 @@ var BABYLON;
     var QuinticEase = (function (_super) {
         __extends(QuinticEase, _super);
         function QuinticEase() {
-            return _super !== null && _super.apply(this, arguments) || this;
+            return _super.apply(this, arguments) || this;
         }
         QuinticEase.prototype.easeInCore = function (gradient) {
             return (gradient * gradient * gradient * gradient * gradient);
@@ -34083,7 +34083,7 @@ var BABYLON;
     var SineEase = (function (_super) {
         __extends(SineEase, _super);
         function SineEase() {
-            return _super !== null && _super.apply(this, arguments) || this;
+            return _super.apply(this, arguments) || this;
         }
         SineEase.prototype.easeInCore = function (gradient) {
             return (1.0 - Math.sin(1.5707963267948966 * (1.0 - gradient)));
@@ -34939,14 +34939,6 @@ var BABYLON;
             this._bone1Mat = BABYLON.Matrix.Identity();
             this._bone2Ang = Math.PI;
             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._tmpQuat1 = BABYLON.Quaternion.Identity();
             this._rightHandedSystem = false;
             this._bendAxis = BABYLON.Vector3.Right();
             this._slerping = false;
@@ -35039,8 +35031,8 @@ var BABYLON;
             var bone1 = this._bone1;
             var target = this.targetPosition;
             var poleTarget = this.poleTargetPosition;
-            var mat1 = this._tmpMat1;
-            var mat2 = this._tmpMat2;
+            var mat1 = BoneIKController._tmpMats[0];
+            var mat2 = BoneIKController._tmpMats[1];
             if (this.targetMesh) {
                 target.copyFrom(this.targetMesh.getAbsolutePosition());
             }
@@ -35050,11 +35042,12 @@ var BABYLON;
             else if (this.poleTargetMesh) {
                 BABYLON.Vector3.TransformCoordinatesToRef(this.poleTargetLocalOffset, this.poleTargetMesh.getWorldMatrix(), poleTarget);
             }
-            var bonePos = this._tmpVec1;
-            var zaxis = this._tmpVec2;
-            var xaxis = this._tmpVec3;
-            var yaxis = this._tmpVec4;
-            var upAxis = this._tmpVec5;
+            var bonePos = BoneIKController._tmpVecs[0];
+            var zaxis = BoneIKController._tmpVecs[1];
+            var xaxis = BoneIKController._tmpVecs[2];
+            var yaxis = BoneIKController._tmpVecs[3];
+            var upAxis = BoneIKController._tmpVecs[4];
+            var _tmpQuat = BoneIKController._tmpQuat;
             bone1.getAbsolutePositionToRef(this.mesh, bonePos);
             poleTarget.subtractToRef(bonePos, upAxis);
             if (upAxis.x == 0 && upAxis.y == 0 && upAxis.z == 0) {
@@ -35100,9 +35093,10 @@ var BABYLON;
                 mat2.multiplyToRef(mat1, mat1);
             }
             else {
-                this._tmpVec1.copyFrom(this._bendAxis);
-                this._tmpVec1.x *= -1;
-                BABYLON.Matrix.RotationAxisToRef(this._tmpVec1, -angB, mat2);
+                var _tmpVec = BoneIKController._tmpVecs[5];
+                _tmpVec.copyFrom(this._bendAxis);
+                _tmpVec.x *= -1;
+                BABYLON.Matrix.RotationAxisToRef(_tmpVec, -angB, mat2);
                 mat2.multiplyToRef(mat1, mat1);
             }
             if (this.poleAngle) {
@@ -35113,8 +35107,8 @@ var BABYLON;
                 if (!this._slerping) {
                     BABYLON.Quaternion.FromRotationMatrixToRef(this._bone1Mat, this._bone1Quat);
                 }
-                BABYLON.Quaternion.FromRotationMatrixToRef(mat1, this._tmpQuat1);
-                BABYLON.Quaternion.SlerpToRef(this._bone1Quat, this._tmpQuat1, this.slerpAmount, this._bone1Quat);
+                BABYLON.Quaternion.FromRotationMatrixToRef(mat1, _tmpQuat);
+                BABYLON.Quaternion.SlerpToRef(this._bone1Quat, _tmpQuat, this.slerpAmount, this._bone1Quat);
                 angC = this._bone2Ang * (1.0 - this.slerpAmount) + angC * this.slerpAmount;
                 this._bone1.setRotationQuaternion(this._bone1Quat, BABYLON.Space.WORLD, this.mesh);
                 this._slerping = true;
@@ -35129,6 +35123,9 @@ var BABYLON;
         };
         return BoneIKController;
     }());
+    BoneIKController._tmpVecs = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
+    BoneIKController._tmpQuat = BABYLON.Quaternion.Identity();
+    BoneIKController._tmpMats = [BABYLON.Matrix.Identity(), BABYLON.Matrix.Identity()];
     BABYLON.BoneIKController = BoneIKController;
 })(BABYLON || (BABYLON = {}));
 
@@ -49970,7 +49967,7 @@ var BABYLON;
     var ShadowsOptimization = (function (_super) {
         __extends(ShadowsOptimization, _super);
         function ShadowsOptimization() {
-            var _this = _super !== null && _super.apply(this, arguments) || this;
+            var _this = _super.apply(this, arguments) || this;
             _this.apply = function (scene) {
                 scene.shadowsEnabled = false;
                 return true;
@@ -49983,7 +49980,7 @@ var BABYLON;
     var PostProcessesOptimization = (function (_super) {
         __extends(PostProcessesOptimization, _super);
         function PostProcessesOptimization() {
-            var _this = _super !== null && _super.apply(this, arguments) || this;
+            var _this = _super.apply(this, arguments) || this;
             _this.apply = function (scene) {
                 scene.postProcessesEnabled = false;
                 return true;
@@ -49996,7 +49993,7 @@ var BABYLON;
     var LensFlaresOptimization = (function (_super) {
         __extends(LensFlaresOptimization, _super);
         function LensFlaresOptimization() {
-            var _this = _super !== null && _super.apply(this, arguments) || this;
+            var _this = _super.apply(this, arguments) || this;
             _this.apply = function (scene) {
                 scene.lensFlaresEnabled = false;
                 return true;
@@ -50009,7 +50006,7 @@ var BABYLON;
     var ParticlesOptimization = (function (_super) {
         __extends(ParticlesOptimization, _super);
         function ParticlesOptimization() {
-            var _this = _super !== null && _super.apply(this, arguments) || this;
+            var _this = _super.apply(this, arguments) || this;
             _this.apply = function (scene) {
                 scene.particlesEnabled = false;
                 return true;
@@ -50022,7 +50019,7 @@ var BABYLON;
     var RenderTargetsOptimization = (function (_super) {
         __extends(RenderTargetsOptimization, _super);
         function RenderTargetsOptimization() {
-            var _this = _super !== null && _super.apply(this, arguments) || this;
+            var _this = _super.apply(this, arguments) || this;
             _this.apply = function (scene) {
                 scene.renderTargetsEnabled = false;
                 return true;
@@ -50035,7 +50032,7 @@ var BABYLON;
     var MergeMeshesOptimization = (function (_super) {
         __extends(MergeMeshesOptimization, _super);
         function MergeMeshesOptimization() {
-            var _this = _super !== null && _super.apply(this, arguments) || this;
+            var _this = _super.apply(this, arguments) || this;
             _this._canBeMerged = function (abstractMesh) {
                 if (!(abstractMesh instanceof BABYLON.Mesh)) {
                     return false;
@@ -50939,7 +50936,7 @@ var BABYLON;
     var FxaaPostProcess = (function (_super) {
         __extends(FxaaPostProcess, _super);
         function FxaaPostProcess(name, options, camera, samplingMode, engine, reusable) {
-            var _this = _super.call(this, name, "fxaa", ["texelSize"], null, options, camera, samplingMode, engine, reusable) || this;
+            var _this = _super.call(this, name, "fxaa", ["texelSize"], null, options, camera, samplingMode || BABYLON.Texture.BILINEAR_SAMPLINGMODE, engine, reusable) || this;
             _this.onSizeChangedObservable.add(function () {
                 _this.texelWidth = 1.0 / _this.width;
                 _this.texelHeight = 1.0 / _this.height;
@@ -52288,8 +52285,8 @@ var BABYLON;
                 - trigger
                 - LED
                 */
-                var mesh = newMeshes[1];
-                _this.attachToMesh(mesh);
+                _this._defaultModel = newMeshes[1];
+                _this.attachToMesh(_this._defaultModel);
             });
         };
         Object.defineProperty(ViveController.prototype, "onLeftButtonStateChangedObservable", {
@@ -52327,12 +52324,23 @@ var BABYLON;
                     this.onPadStateChangedObservable.notifyObservers(notifyObject);
                     return;
                 case 1:
+                    if (this._defaultModel) {
+                        (this._defaultModel.getChildren()[6]).rotation.x = -notifyObject.value * 0.15;
+                    }
                     this.onTriggerStateChangedObservable.notifyObservers(notifyObject);
                     return;
                 case 2:
                     this.onMainButtonStateChangedObservable.notifyObservers(notifyObject);
                     return;
                 case 3:
+                    if (this._defaultModel) {
+                        if (notifyObject.value === 1) {
+                            (this._defaultModel.getChildren()[2]).position.y = -0.001;
+                        }
+                        else {
+                            (this._defaultModel.getChildren()[2]).position.y = 0;
+                        }
+                    }
                     this.onSecondaryButtonStateChangedObservable.notifyObservers(notifyObject);
                     return;
             }
@@ -57090,7 +57098,7 @@ var BABYLON;
     })(Internals = BABYLON.Internals || (BABYLON.Internals = {}));
 })(BABYLON || (BABYLON = {}));
 
-//# sourceMappingURL=babylon.tools.pmremgenerator.js.map
+//# sourceMappingURL=babylon.tools.pmremGenerator.js.map
 
 
 
@@ -60362,12 +60370,6 @@ var BABYLON;
     __decorate([
         BABYLON.serialize()
     ], StandardRenderingPipeline.prototype, "depthOfFieldBlurWidth", void 0);
-    __decorate([
-        BABYLON.serialize()
-    ], StandardRenderingPipeline.prototype, "DepthOfFieldEnabled", null);
-    __decorate([
-        BABYLON.serialize()
-    ], StandardRenderingPipeline.prototype, "LensFlareEnabled", null);
     BABYLON.StandardRenderingPipeline = StandardRenderingPipeline;
 })(BABYLON || (BABYLON = {}));
 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 4108 - 4112
dist/preview release/babylon.module.d.ts


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 14 - 14
dist/preview release/babylon.noworker.js


+ 1 - 1
src/Mesh/babylon.instancedMesh.ts

@@ -160,7 +160,7 @@
             var result = this._sourceMesh.createInstance(name);
 
             // Deep copy
-            Tools.DeepCopy(this, result, ["name", "subMeshes"], []);
+            Tools.DeepCopy(this, result, ["name", "subMeshes", "uniqueId"], []);
 
             // Bounding info
             this.refreshBoundingInfo();

+ 1 - 1
src/Mesh/babylon.mesh.ts

@@ -151,7 +151,7 @@
                 }
 
                 // Deep copy
-                Tools.DeepCopy(source, this, ["name", "material", "skeleton", "instances", "parent"], ["_poseMatrix"]);
+                Tools.DeepCopy(source, this, ["name", "material", "skeleton", "instances", "parent", "uniqueId"], ["_poseMatrix"]);
 
                 // Parent
                 this.parent = source.parent;