Browse Source

Merge branch 'master' of https://github.com/BabylonJS/Babylon.js

Jaskar 7 năm trước cách đây
mục cha
commit
831b493f0a

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


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


+ 49 - 29
dist/preview release/babylon.max.js

@@ -12085,7 +12085,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "3.3.0-alpha.4";
+                return "3.3.0-alpha.5";
             },
             enumerable: true,
             configurable: true
@@ -18540,6 +18540,18 @@ var BABYLON;
             _this._rotation = BABYLON.Vector3.Zero();
             _this._scaling = BABYLON.Vector3.One();
             _this._isDirty = false;
+            /**
+            * Set the billboard mode. Default is 0.
+            *
+            * | Value | Type | Description |
+            * | --- | --- | --- |
+            * | 0 | BILLBOARDMODE_NONE |  |
+            * | 1 | BILLBOARDMODE_X |  |
+            * | 2 | BILLBOARDMODE_Y |  |
+            * | 4 | BILLBOARDMODE_Z |  |
+            * | 7 | BILLBOARDMODE_ALL |  |
+            *
+            */
             _this.billboardMode = TransformNode.BILLBOARDMODE_NONE;
             _this.scalingDeterminant = 1;
             _this.infiniteDistance = false;
@@ -57710,46 +57722,54 @@ var BABYLON;
          * Creates a new instance ConeParticleEmitter
          * @param radius the radius of the emission cone (1 by default)
          * @param angles the cone base angle (PI by default)
-         * @param directionRandomizer defines how much to randomize the particle direction [0-1]
-         */
-        function ConeParticleEmitter(radius, 
-        /**
-         * The radius of the emission cone.
-         */
-        angle, 
-        /**
-         * The cone base angle.
+         * @param directionRandomizer defines how much to randomize the particle direction [0-1] (default is 0)
          */
+        function ConeParticleEmitter(radius, angle, 
+        /** defines how much to randomize the particle direction [0-1] (default is 0) */
         directionRandomizer) {
             if (radius === void 0) { radius = 1; }
             if (angle === void 0) { angle = Math.PI; }
             if (directionRandomizer === void 0) { directionRandomizer = 0; }
-            this.angle = angle;
             this.directionRandomizer = directionRandomizer;
+            this.angle = angle;
             this.radius = radius;
         }
         Object.defineProperty(ConeParticleEmitter.prototype, "radius", {
             /**
-             * Gets the radius of the emission cone.
+             * Gets or sets the radius of the emission cone
              */
             get: function () {
                 return this._radius;
             },
+            set: function (value) {
+                this._radius = value;
+                this._buildHeight();
+            },
+            enumerable: true,
+            configurable: true
+        });
+        Object.defineProperty(ConeParticleEmitter.prototype, "angle", {
             /**
-             * Sets the radius of the emission cone.
+             * Gets or sets the angle of the emission cone
              */
+            get: function () {
+                return this._angle;
+            },
             set: function (value) {
-                this._radius = value;
-                if (this.angle !== 0) {
-                    this._height = value / Math.tan(this.angle / 2);
-                }
-                else {
-                    this._height = 1;
-                }
+                this._angle = value;
+                this._buildHeight();
             },
             enumerable: true,
             configurable: true
         });
+        ConeParticleEmitter.prototype._buildHeight = function () {
+            if (this._angle !== 0) {
+                this._height = this._radius / Math.tan(this._angle / 2);
+            }
+            else {
+                this._height = 1;
+            }
+        };
         /**
          * Called by the particle System when the direction is computed for the created particle.
          * @param emitPower is the power of the particle (speed)
@@ -57758,7 +57778,7 @@ var BABYLON;
          * @param particle is the particle we are computed the direction for
          */
         ConeParticleEmitter.prototype.startDirectionFunction = function (emitPower, worldMatrix, directionToUpdate, particle) {
-            if (this.angle === 0) {
+            if (this._angle === 0) {
                 BABYLON.Vector3.TransformNormalFromFloatsToRef(0, emitPower, 0, worldMatrix, directionToUpdate);
             }
             else {
@@ -57797,7 +57817,7 @@ var BABYLON;
          * @returns the new emitter
          */
         ConeParticleEmitter.prototype.clone = function () {
-            var newOne = new ConeParticleEmitter(this.radius, this.angle, this.directionRandomizer);
+            var newOne = new ConeParticleEmitter(this._radius, this._angle, this.directionRandomizer);
             BABYLON.Tools.DeepCopy(this, newOne);
             return newOne;
         };
@@ -57806,8 +57826,8 @@ var BABYLON;
          * @param effect defines the update shader
          */
         ConeParticleEmitter.prototype.applyToShader = function (effect) {
-            effect.setFloat("radius", this.radius);
-            effect.setFloat("coneAngle", this.angle);
+            effect.setFloat("radius", this._radius);
+            effect.setFloat("coneAngle", this._angle);
             effect.setFloat("height", this._height);
             effect.setFloat("directionRandomizer", this.directionRandomizer);
         };
@@ -57832,8 +57852,8 @@ var BABYLON;
         ConeParticleEmitter.prototype.serialize = function () {
             var serializationObject = {};
             serializationObject.type = this.getClassName();
-            serializationObject.radius = this.radius;
-            serializationObject.angle = this.angle;
+            serializationObject.radius = this._radius;
+            serializationObject.angle = this._angle;
             serializationObject.directionRandomizer = this.directionRandomizer;
             return serializationObject;
         };
@@ -59152,7 +59172,7 @@ var BABYLON;
             this._particlesIntersect = options ? options.particleIntersection : false;
             this._bSphereOnly = options ? options.boundingSphereOnly : false;
             this._bSphereRadiusFactor = (options && options.bSphereRadiusFactor) ? options.bSphereRadiusFactor : 1.0;
-            if (options && options.updatable) {
+            if (options && options.updatable !== undefined) {
                 this._updatable = options.updatable;
             }
             else {
@@ -85872,10 +85892,10 @@ var BABYLON;
             return lastShape;
         }*/
         OimoJSPlugin.prototype.setLinearVelocity = function (impostor, velocity) {
-            impostor.physicsBody.linearVelocity.init(velocity.x, velocity.y, velocity.z);
+            impostor.physicsBody.linearVelocity.copy(velocity);
         };
         OimoJSPlugin.prototype.setAngularVelocity = function (impostor, velocity) {
-            impostor.physicsBody.angularVelocity.init(velocity.x, velocity.y, velocity.z);
+            impostor.physicsBody.angularVelocity.copy(velocity);
         };
         OimoJSPlugin.prototype.getLinearVelocity = function (impostor) {
             var v = impostor.physicsBody.linearVelocity;

+ 49 - 29
dist/preview release/babylon.no-module.max.js

@@ -12052,7 +12052,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "3.3.0-alpha.4";
+                return "3.3.0-alpha.5";
             },
             enumerable: true,
             configurable: true
@@ -18507,6 +18507,18 @@ var BABYLON;
             _this._rotation = BABYLON.Vector3.Zero();
             _this._scaling = BABYLON.Vector3.One();
             _this._isDirty = false;
+            /**
+            * Set the billboard mode. Default is 0.
+            *
+            * | Value | Type | Description |
+            * | --- | --- | --- |
+            * | 0 | BILLBOARDMODE_NONE |  |
+            * | 1 | BILLBOARDMODE_X |  |
+            * | 2 | BILLBOARDMODE_Y |  |
+            * | 4 | BILLBOARDMODE_Z |  |
+            * | 7 | BILLBOARDMODE_ALL |  |
+            *
+            */
             _this.billboardMode = TransformNode.BILLBOARDMODE_NONE;
             _this.scalingDeterminant = 1;
             _this.infiniteDistance = false;
@@ -57677,46 +57689,54 @@ var BABYLON;
          * Creates a new instance ConeParticleEmitter
          * @param radius the radius of the emission cone (1 by default)
          * @param angles the cone base angle (PI by default)
-         * @param directionRandomizer defines how much to randomize the particle direction [0-1]
-         */
-        function ConeParticleEmitter(radius, 
-        /**
-         * The radius of the emission cone.
-         */
-        angle, 
-        /**
-         * The cone base angle.
+         * @param directionRandomizer defines how much to randomize the particle direction [0-1] (default is 0)
          */
+        function ConeParticleEmitter(radius, angle, 
+        /** defines how much to randomize the particle direction [0-1] (default is 0) */
         directionRandomizer) {
             if (radius === void 0) { radius = 1; }
             if (angle === void 0) { angle = Math.PI; }
             if (directionRandomizer === void 0) { directionRandomizer = 0; }
-            this.angle = angle;
             this.directionRandomizer = directionRandomizer;
+            this.angle = angle;
             this.radius = radius;
         }
         Object.defineProperty(ConeParticleEmitter.prototype, "radius", {
             /**
-             * Gets the radius of the emission cone.
+             * Gets or sets the radius of the emission cone
              */
             get: function () {
                 return this._radius;
             },
+            set: function (value) {
+                this._radius = value;
+                this._buildHeight();
+            },
+            enumerable: true,
+            configurable: true
+        });
+        Object.defineProperty(ConeParticleEmitter.prototype, "angle", {
             /**
-             * Sets the radius of the emission cone.
+             * Gets or sets the angle of the emission cone
              */
+            get: function () {
+                return this._angle;
+            },
             set: function (value) {
-                this._radius = value;
-                if (this.angle !== 0) {
-                    this._height = value / Math.tan(this.angle / 2);
-                }
-                else {
-                    this._height = 1;
-                }
+                this._angle = value;
+                this._buildHeight();
             },
             enumerable: true,
             configurable: true
         });
+        ConeParticleEmitter.prototype._buildHeight = function () {
+            if (this._angle !== 0) {
+                this._height = this._radius / Math.tan(this._angle / 2);
+            }
+            else {
+                this._height = 1;
+            }
+        };
         /**
          * Called by the particle System when the direction is computed for the created particle.
          * @param emitPower is the power of the particle (speed)
@@ -57725,7 +57745,7 @@ var BABYLON;
          * @param particle is the particle we are computed the direction for
          */
         ConeParticleEmitter.prototype.startDirectionFunction = function (emitPower, worldMatrix, directionToUpdate, particle) {
-            if (this.angle === 0) {
+            if (this._angle === 0) {
                 BABYLON.Vector3.TransformNormalFromFloatsToRef(0, emitPower, 0, worldMatrix, directionToUpdate);
             }
             else {
@@ -57764,7 +57784,7 @@ var BABYLON;
          * @returns the new emitter
          */
         ConeParticleEmitter.prototype.clone = function () {
-            var newOne = new ConeParticleEmitter(this.radius, this.angle, this.directionRandomizer);
+            var newOne = new ConeParticleEmitter(this._radius, this._angle, this.directionRandomizer);
             BABYLON.Tools.DeepCopy(this, newOne);
             return newOne;
         };
@@ -57773,8 +57793,8 @@ var BABYLON;
          * @param effect defines the update shader
          */
         ConeParticleEmitter.prototype.applyToShader = function (effect) {
-            effect.setFloat("radius", this.radius);
-            effect.setFloat("coneAngle", this.angle);
+            effect.setFloat("radius", this._radius);
+            effect.setFloat("coneAngle", this._angle);
             effect.setFloat("height", this._height);
             effect.setFloat("directionRandomizer", this.directionRandomizer);
         };
@@ -57799,8 +57819,8 @@ var BABYLON;
         ConeParticleEmitter.prototype.serialize = function () {
             var serializationObject = {};
             serializationObject.type = this.getClassName();
-            serializationObject.radius = this.radius;
-            serializationObject.angle = this.angle;
+            serializationObject.radius = this._radius;
+            serializationObject.angle = this._angle;
             serializationObject.directionRandomizer = this.directionRandomizer;
             return serializationObject;
         };
@@ -59119,7 +59139,7 @@ var BABYLON;
             this._particlesIntersect = options ? options.particleIntersection : false;
             this._bSphereOnly = options ? options.boundingSphereOnly : false;
             this._bSphereRadiusFactor = (options && options.bSphereRadiusFactor) ? options.bSphereRadiusFactor : 1.0;
-            if (options && options.updatable) {
+            if (options && options.updatable !== undefined) {
                 this._updatable = options.updatable;
             }
             else {
@@ -85839,10 +85859,10 @@ var BABYLON;
             return lastShape;
         }*/
         OimoJSPlugin.prototype.setLinearVelocity = function (impostor, velocity) {
-            impostor.physicsBody.linearVelocity.init(velocity.x, velocity.y, velocity.z);
+            impostor.physicsBody.linearVelocity.copy(velocity);
         };
         OimoJSPlugin.prototype.setAngularVelocity = function (impostor, velocity) {
-            impostor.physicsBody.angularVelocity.init(velocity.x, velocity.y, velocity.z);
+            impostor.physicsBody.angularVelocity.copy(velocity);
         };
         OimoJSPlugin.prototype.getLinearVelocity = function (impostor) {
             var v = impostor.physicsBody.linearVelocity;

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


+ 49 - 29
dist/preview release/es6.js

@@ -12052,7 +12052,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "3.3.0-alpha.4";
+                return "3.3.0-alpha.5";
             },
             enumerable: true,
             configurable: true
@@ -18507,6 +18507,18 @@ var BABYLON;
             _this._rotation = BABYLON.Vector3.Zero();
             _this._scaling = BABYLON.Vector3.One();
             _this._isDirty = false;
+            /**
+            * Set the billboard mode. Default is 0.
+            *
+            * | Value | Type | Description |
+            * | --- | --- | --- |
+            * | 0 | BILLBOARDMODE_NONE |  |
+            * | 1 | BILLBOARDMODE_X |  |
+            * | 2 | BILLBOARDMODE_Y |  |
+            * | 4 | BILLBOARDMODE_Z |  |
+            * | 7 | BILLBOARDMODE_ALL |  |
+            *
+            */
             _this.billboardMode = TransformNode.BILLBOARDMODE_NONE;
             _this.scalingDeterminant = 1;
             _this.infiniteDistance = false;
@@ -57677,46 +57689,54 @@ var BABYLON;
          * Creates a new instance ConeParticleEmitter
          * @param radius the radius of the emission cone (1 by default)
          * @param angles the cone base angle (PI by default)
-         * @param directionRandomizer defines how much to randomize the particle direction [0-1]
-         */
-        function ConeParticleEmitter(radius, 
-        /**
-         * The radius of the emission cone.
-         */
-        angle, 
-        /**
-         * The cone base angle.
+         * @param directionRandomizer defines how much to randomize the particle direction [0-1] (default is 0)
          */
+        function ConeParticleEmitter(radius, angle, 
+        /** defines how much to randomize the particle direction [0-1] (default is 0) */
         directionRandomizer) {
             if (radius === void 0) { radius = 1; }
             if (angle === void 0) { angle = Math.PI; }
             if (directionRandomizer === void 0) { directionRandomizer = 0; }
-            this.angle = angle;
             this.directionRandomizer = directionRandomizer;
+            this.angle = angle;
             this.radius = radius;
         }
         Object.defineProperty(ConeParticleEmitter.prototype, "radius", {
             /**
-             * Gets the radius of the emission cone.
+             * Gets or sets the radius of the emission cone
              */
             get: function () {
                 return this._radius;
             },
+            set: function (value) {
+                this._radius = value;
+                this._buildHeight();
+            },
+            enumerable: true,
+            configurable: true
+        });
+        Object.defineProperty(ConeParticleEmitter.prototype, "angle", {
             /**
-             * Sets the radius of the emission cone.
+             * Gets or sets the angle of the emission cone
              */
+            get: function () {
+                return this._angle;
+            },
             set: function (value) {
-                this._radius = value;
-                if (this.angle !== 0) {
-                    this._height = value / Math.tan(this.angle / 2);
-                }
-                else {
-                    this._height = 1;
-                }
+                this._angle = value;
+                this._buildHeight();
             },
             enumerable: true,
             configurable: true
         });
+        ConeParticleEmitter.prototype._buildHeight = function () {
+            if (this._angle !== 0) {
+                this._height = this._radius / Math.tan(this._angle / 2);
+            }
+            else {
+                this._height = 1;
+            }
+        };
         /**
          * Called by the particle System when the direction is computed for the created particle.
          * @param emitPower is the power of the particle (speed)
@@ -57725,7 +57745,7 @@ var BABYLON;
          * @param particle is the particle we are computed the direction for
          */
         ConeParticleEmitter.prototype.startDirectionFunction = function (emitPower, worldMatrix, directionToUpdate, particle) {
-            if (this.angle === 0) {
+            if (this._angle === 0) {
                 BABYLON.Vector3.TransformNormalFromFloatsToRef(0, emitPower, 0, worldMatrix, directionToUpdate);
             }
             else {
@@ -57764,7 +57784,7 @@ var BABYLON;
          * @returns the new emitter
          */
         ConeParticleEmitter.prototype.clone = function () {
-            var newOne = new ConeParticleEmitter(this.radius, this.angle, this.directionRandomizer);
+            var newOne = new ConeParticleEmitter(this._radius, this._angle, this.directionRandomizer);
             BABYLON.Tools.DeepCopy(this, newOne);
             return newOne;
         };
@@ -57773,8 +57793,8 @@ var BABYLON;
          * @param effect defines the update shader
          */
         ConeParticleEmitter.prototype.applyToShader = function (effect) {
-            effect.setFloat("radius", this.radius);
-            effect.setFloat("coneAngle", this.angle);
+            effect.setFloat("radius", this._radius);
+            effect.setFloat("coneAngle", this._angle);
             effect.setFloat("height", this._height);
             effect.setFloat("directionRandomizer", this.directionRandomizer);
         };
@@ -57799,8 +57819,8 @@ var BABYLON;
         ConeParticleEmitter.prototype.serialize = function () {
             var serializationObject = {};
             serializationObject.type = this.getClassName();
-            serializationObject.radius = this.radius;
-            serializationObject.angle = this.angle;
+            serializationObject.radius = this._radius;
+            serializationObject.angle = this._angle;
             serializationObject.directionRandomizer = this.directionRandomizer;
             return serializationObject;
         };
@@ -59119,7 +59139,7 @@ var BABYLON;
             this._particlesIntersect = options ? options.particleIntersection : false;
             this._bSphereOnly = options ? options.boundingSphereOnly : false;
             this._bSphereRadiusFactor = (options && options.bSphereRadiusFactor) ? options.bSphereRadiusFactor : 1.0;
-            if (options && options.updatable) {
+            if (options && options.updatable !== undefined) {
                 this._updatable = options.updatable;
             }
             else {
@@ -85839,10 +85859,10 @@ var BABYLON;
             return lastShape;
         }*/
         OimoJSPlugin.prototype.setLinearVelocity = function (impostor, velocity) {
-            impostor.physicsBody.linearVelocity.init(velocity.x, velocity.y, velocity.z);
+            impostor.physicsBody.linearVelocity.copy(velocity);
         };
         OimoJSPlugin.prototype.setAngularVelocity = function (impostor, velocity) {
-            impostor.physicsBody.angularVelocity.init(velocity.x, velocity.y, velocity.z);
+            impostor.physicsBody.angularVelocity.copy(velocity);
         };
         OimoJSPlugin.prototype.getLinearVelocity = function (impostor) {
             var v = impostor.physicsBody.linearVelocity;

+ 1 - 1
dist/preview release/gltf2Interface/package.json

@@ -1,7 +1,7 @@
 {
     "name": "babylonjs-gltf2interface",
     "description": "A typescript declaration of babylon's gltf2 inteface.",
-    "version": "3.3.0-alpha.4",
+    "version": "3.3.0-alpha.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
dist/preview release/gui/babylon.gui.js

@@ -7432,7 +7432,7 @@ var BABYLON;
                     this._isVisible = value;
                     var mesh = this.mesh;
                     if (mesh) {
-                        mesh.isVisible = value;
+                        mesh.setEnabled(value);
                     }
                 },
                 enumerable: true,

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


+ 1 - 1
dist/preview release/gui/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-gui",
     "description": "The Babylon.js GUI library is an extension you can use to generate interactive user interface. It is build on top of the DynamicTexture.",
-    "version": "3.3.0-alpha.4",
+    "version": "3.3.0-alpha.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

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


+ 1 - 0
dist/preview release/inspector/babylon.inspector.js

@@ -304,6 +304,7 @@ var INSPECTOR;
             // Create popup
             var popup = window.open('', 'Babylon.js INSPECTOR', 'toolbar=no,resizable=yes,menubar=no,width=750,height=1000');
             if (!popup) {
+                alert("Please update your browser to open the Babylon.js inspector in an external view.");
                 return;
             }
             popup.document.title = "Babylon.js INSPECTOR";

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


+ 1 - 1
dist/preview release/inspector/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-inspector",
     "description": "The Babylon.js inspector.",
-    "version": "3.3.0-alpha.4",
+    "version": "3.3.0-alpha.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 2 - 2
dist/preview release/loaders/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-loaders",
     "description": "The Babylon.js file loaders library is an extension you can use to load different 3D file types into a Babylon scene.",
-    "version": "3.3.0-alpha.4",
+    "version": "3.3.0-alpha.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs-gltf2interface": "3.3.0-alpha.4"
+        "babylonjs-gltf2interface": "3.3.0-alpha.6"
     },
     "peerDependencies": {
         "babylonjs": ">=3.2.0-alpha"

+ 1 - 1
dist/preview release/materialsLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-materials",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.3.0-alpha.4",
+    "version": "3.3.0-alpha.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
dist/preview release/postProcessesLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-post-process",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.3.0-alpha.4",
+    "version": "3.3.0-alpha.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
dist/preview release/proceduralTexturesLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-procedural-textures",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "3.3.0-alpha.4",
+    "version": "3.3.0-alpha.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 2 - 2
dist/preview release/serializers/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-serializers",
     "description": "The Babylon.js serializers library is an extension you can use to serialize Babylon scenes.",
-    "version": "3.3.0-alpha.4",
+    "version": "3.3.0-alpha.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs-gltf2interface": "3.3.0-alpha.4"
+        "babylonjs-gltf2interface": "3.3.0-alpha.6"
     },
     "peerDependencies": {
         "babylonjs": ">=3.2.0-alpha"

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


+ 49 - 29
dist/preview release/viewer/babylon.viewer.max.js

@@ -12173,7 +12173,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "3.3.0-alpha.4";
+                return "3.3.0-alpha.5";
             },
             enumerable: true,
             configurable: true
@@ -18628,6 +18628,18 @@ var BABYLON;
             _this._rotation = BABYLON.Vector3.Zero();
             _this._scaling = BABYLON.Vector3.One();
             _this._isDirty = false;
+            /**
+            * Set the billboard mode. Default is 0.
+            *
+            * | Value | Type | Description |
+            * | --- | --- | --- |
+            * | 0 | BILLBOARDMODE_NONE |  |
+            * | 1 | BILLBOARDMODE_X |  |
+            * | 2 | BILLBOARDMODE_Y |  |
+            * | 4 | BILLBOARDMODE_Z |  |
+            * | 7 | BILLBOARDMODE_ALL |  |
+            *
+            */
             _this.billboardMode = TransformNode.BILLBOARDMODE_NONE;
             _this.scalingDeterminant = 1;
             _this.infiniteDistance = false;
@@ -57798,46 +57810,54 @@ var BABYLON;
          * Creates a new instance ConeParticleEmitter
          * @param radius the radius of the emission cone (1 by default)
          * @param angles the cone base angle (PI by default)
-         * @param directionRandomizer defines how much to randomize the particle direction [0-1]
-         */
-        function ConeParticleEmitter(radius, 
-        /**
-         * The radius of the emission cone.
-         */
-        angle, 
-        /**
-         * The cone base angle.
+         * @param directionRandomizer defines how much to randomize the particle direction [0-1] (default is 0)
          */
+        function ConeParticleEmitter(radius, angle, 
+        /** defines how much to randomize the particle direction [0-1] (default is 0) */
         directionRandomizer) {
             if (radius === void 0) { radius = 1; }
             if (angle === void 0) { angle = Math.PI; }
             if (directionRandomizer === void 0) { directionRandomizer = 0; }
-            this.angle = angle;
             this.directionRandomizer = directionRandomizer;
+            this.angle = angle;
             this.radius = radius;
         }
         Object.defineProperty(ConeParticleEmitter.prototype, "radius", {
             /**
-             * Gets the radius of the emission cone.
+             * Gets or sets the radius of the emission cone
              */
             get: function () {
                 return this._radius;
             },
+            set: function (value) {
+                this._radius = value;
+                this._buildHeight();
+            },
+            enumerable: true,
+            configurable: true
+        });
+        Object.defineProperty(ConeParticleEmitter.prototype, "angle", {
             /**
-             * Sets the radius of the emission cone.
+             * Gets or sets the angle of the emission cone
              */
+            get: function () {
+                return this._angle;
+            },
             set: function (value) {
-                this._radius = value;
-                if (this.angle !== 0) {
-                    this._height = value / Math.tan(this.angle / 2);
-                }
-                else {
-                    this._height = 1;
-                }
+                this._angle = value;
+                this._buildHeight();
             },
             enumerable: true,
             configurable: true
         });
+        ConeParticleEmitter.prototype._buildHeight = function () {
+            if (this._angle !== 0) {
+                this._height = this._radius / Math.tan(this._angle / 2);
+            }
+            else {
+                this._height = 1;
+            }
+        };
         /**
          * Called by the particle System when the direction is computed for the created particle.
          * @param emitPower is the power of the particle (speed)
@@ -57846,7 +57866,7 @@ var BABYLON;
          * @param particle is the particle we are computed the direction for
          */
         ConeParticleEmitter.prototype.startDirectionFunction = function (emitPower, worldMatrix, directionToUpdate, particle) {
-            if (this.angle === 0) {
+            if (this._angle === 0) {
                 BABYLON.Vector3.TransformNormalFromFloatsToRef(0, emitPower, 0, worldMatrix, directionToUpdate);
             }
             else {
@@ -57885,7 +57905,7 @@ var BABYLON;
          * @returns the new emitter
          */
         ConeParticleEmitter.prototype.clone = function () {
-            var newOne = new ConeParticleEmitter(this.radius, this.angle, this.directionRandomizer);
+            var newOne = new ConeParticleEmitter(this._radius, this._angle, this.directionRandomizer);
             BABYLON.Tools.DeepCopy(this, newOne);
             return newOne;
         };
@@ -57894,8 +57914,8 @@ var BABYLON;
          * @param effect defines the update shader
          */
         ConeParticleEmitter.prototype.applyToShader = function (effect) {
-            effect.setFloat("radius", this.radius);
-            effect.setFloat("coneAngle", this.angle);
+            effect.setFloat("radius", this._radius);
+            effect.setFloat("coneAngle", this._angle);
             effect.setFloat("height", this._height);
             effect.setFloat("directionRandomizer", this.directionRandomizer);
         };
@@ -57920,8 +57940,8 @@ var BABYLON;
         ConeParticleEmitter.prototype.serialize = function () {
             var serializationObject = {};
             serializationObject.type = this.getClassName();
-            serializationObject.radius = this.radius;
-            serializationObject.angle = this.angle;
+            serializationObject.radius = this._radius;
+            serializationObject.angle = this._angle;
             serializationObject.directionRandomizer = this.directionRandomizer;
             return serializationObject;
         };
@@ -59240,7 +59260,7 @@ var BABYLON;
             this._particlesIntersect = options ? options.particleIntersection : false;
             this._bSphereOnly = options ? options.boundingSphereOnly : false;
             this._bSphereRadiusFactor = (options && options.bSphereRadiusFactor) ? options.bSphereRadiusFactor : 1.0;
-            if (options && options.updatable) {
+            if (options && options.updatable !== undefined) {
                 this._updatable = options.updatable;
             }
             else {
@@ -85960,10 +85980,10 @@ var BABYLON;
             return lastShape;
         }*/
         OimoJSPlugin.prototype.setLinearVelocity = function (impostor, velocity) {
-            impostor.physicsBody.linearVelocity.init(velocity.x, velocity.y, velocity.z);
+            impostor.physicsBody.linearVelocity.copy(velocity);
         };
         OimoJSPlugin.prototype.setAngularVelocity = function (impostor, velocity) {
-            impostor.physicsBody.angularVelocity.init(velocity.x, velocity.y, velocity.z);
+            impostor.physicsBody.angularVelocity.copy(velocity);
         };
         OimoJSPlugin.prototype.getLinearVelocity = function (impostor) {
             var v = impostor.physicsBody.linearVelocity;

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

@@ -69,6 +69,7 @@
 - Fixed `HighlightLayer` support on browsers not supporting HalfFloat ([sebavan](http://www.github.com/sebavan))
 - Fixed support for R and RG texture formats ([sebavan](http://www.github.com/sebavan))
 - Fixed `updatable` parameter setting in the SPS ([jerome](https://github.com/jbousquie))
+- Angular and linear velocity were using the wrong method to copy values to the physics engine ([RaananW](https://github.com/RaananW))
 
 ### Viewer
 

+ 1 - 1
package.json

@@ -9,7 +9,7 @@
     ],
     "name": "babylonjs",
     "description": "Babylon.js is a JavaScript 3D engine based on webgl.",
-    "version": "3.3.0-alpha.4",
+    "version": "3.3.0-alpha.6",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 1 - 1
src/Engine/babylon.engine.ts

@@ -710,7 +710,7 @@
          * Returns the current version of the framework
          */
         public static get Version(): string {
-            return "3.3.0-alpha.4";
+            return "3.3.0-alpha.6";
         }
 
         // Updatable statics so stick with vars here

+ 2 - 2
src/Physics/Plugins/babylon.oimoJSPlugin.ts

@@ -351,11 +351,11 @@ module BABYLON {
         }*/
 
         public setLinearVelocity(impostor: PhysicsImpostor, velocity: Vector3) {
-            impostor.physicsBody.linearVelocity.init(velocity.x, velocity.y, velocity.z);
+            impostor.physicsBody.linearVelocity.copy(velocity);
         }
 
         public setAngularVelocity(impostor: PhysicsImpostor, velocity: Vector3) {
-            impostor.physicsBody.angularVelocity.init(velocity.x, velocity.y, velocity.z);
+            impostor.physicsBody.angularVelocity.copy(velocity);
         }
 
         public getLinearVelocity(impostor: PhysicsImpostor): Nullable<Vector3> {