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

文件差异内容过多而无法显示
+ 6960 - 6936
Playground/babylon.d.txt


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


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


+ 28 - 10
dist/preview release/babylon.max.js

@@ -12069,7 +12069,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "3.3.0-alpha.2";
+                return "3.3.0-alpha.3";
             },
             enumerable: true,
             configurable: true
@@ -18470,6 +18470,11 @@ var BABYLON;
             _this.billboardMode = TransformNode.BILLBOARDMODE_NONE;
             _this.scalingDeterminant = 1;
             _this.infiniteDistance = false;
+            /**
+             * Gets or sets a boolean indicating that non uniform scaling (when at least one component is different from others) should be ignored.
+             * By default the system will update normals to compensate
+             */
+            _this.ignoreNonUniformScaling = false;
             _this.position = BABYLON.Vector3.Zero();
             _this._localWorld = BABYLON.Matrix.Zero();
             _this._worldMatrix = BABYLON.Matrix.Zero();
@@ -18981,7 +18986,7 @@ var BABYLON;
             if (this._nonUniformScaling === value) {
                 return false;
             }
-            this._nonUniformScaling = true;
+            this._nonUniformScaling = value;
             return true;
         };
         /**
@@ -19236,14 +19241,16 @@ var BABYLON;
                 this._worldMatrix.multiplyToRef(this._pivotMatrixInverse, this._worldMatrix);
             }
             // Normal matrix
-            if (this.scaling.isNonUniform) {
-                this._updateNonUniformScalingState(true);
-            }
-            else if (this.parent && this.parent._nonUniformScaling) {
-                this._updateNonUniformScalingState(this.parent._nonUniformScaling);
-            }
-            else {
-                this._updateNonUniformScalingState(false);
+            if (!this.ignoreNonUniformScaling) {
+                if (this.scaling.isNonUniform) {
+                    this._updateNonUniformScalingState(true);
+                }
+                else if (this.parent && this.parent._nonUniformScaling) {
+                    this._updateNonUniformScalingState(this.parent._nonUniformScaling);
+                }
+                else {
+                    this._updateNonUniformScalingState(false);
+                }
             }
             this._afterComputeWorldMatrix();
             // Absolute position
@@ -19387,6 +19394,9 @@ var BABYLON;
             BABYLON.serialize()
         ], TransformNode.prototype, "infiniteDistance", void 0);
         __decorate([
+            BABYLON.serialize()
+        ], TransformNode.prototype, "ignoreNonUniformScaling", void 0);
+        __decorate([
             BABYLON.serializeAsVector3()
         ], TransformNode.prototype, "position", void 0);
         return TransformNode;
@@ -45103,6 +45113,14 @@ var BABYLON;
             },
             /**
              * Sets the transparency mode of the material.
+             *
+             * | Value | Type                                | Description |
+             * | ----- | ----------------------------------- | ----------- |
+             * | 0     | OPAQUE                              |             |
+             * | 1     | ALPHATEST                           |             |
+             * | 2     | ALPHABLEND                          |             |
+             * | 3     | ALPHATESTANDBLEND                   |             |
+             *
              */
             set: function (value) {
                 if (this._transparencyMode === value) {

+ 28 - 10
dist/preview release/babylon.no-module.max.js

@@ -12036,7 +12036,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "3.3.0-alpha.2";
+                return "3.3.0-alpha.3";
             },
             enumerable: true,
             configurable: true
@@ -18437,6 +18437,11 @@ var BABYLON;
             _this.billboardMode = TransformNode.BILLBOARDMODE_NONE;
             _this.scalingDeterminant = 1;
             _this.infiniteDistance = false;
+            /**
+             * Gets or sets a boolean indicating that non uniform scaling (when at least one component is different from others) should be ignored.
+             * By default the system will update normals to compensate
+             */
+            _this.ignoreNonUniformScaling = false;
             _this.position = BABYLON.Vector3.Zero();
             _this._localWorld = BABYLON.Matrix.Zero();
             _this._worldMatrix = BABYLON.Matrix.Zero();
@@ -18948,7 +18953,7 @@ var BABYLON;
             if (this._nonUniformScaling === value) {
                 return false;
             }
-            this._nonUniformScaling = true;
+            this._nonUniformScaling = value;
             return true;
         };
         /**
@@ -19203,14 +19208,16 @@ var BABYLON;
                 this._worldMatrix.multiplyToRef(this._pivotMatrixInverse, this._worldMatrix);
             }
             // Normal matrix
-            if (this.scaling.isNonUniform) {
-                this._updateNonUniformScalingState(true);
-            }
-            else if (this.parent && this.parent._nonUniformScaling) {
-                this._updateNonUniformScalingState(this.parent._nonUniformScaling);
-            }
-            else {
-                this._updateNonUniformScalingState(false);
+            if (!this.ignoreNonUniformScaling) {
+                if (this.scaling.isNonUniform) {
+                    this._updateNonUniformScalingState(true);
+                }
+                else if (this.parent && this.parent._nonUniformScaling) {
+                    this._updateNonUniformScalingState(this.parent._nonUniformScaling);
+                }
+                else {
+                    this._updateNonUniformScalingState(false);
+                }
             }
             this._afterComputeWorldMatrix();
             // Absolute position
@@ -19354,6 +19361,9 @@ var BABYLON;
             BABYLON.serialize()
         ], TransformNode.prototype, "infiniteDistance", void 0);
         __decorate([
+            BABYLON.serialize()
+        ], TransformNode.prototype, "ignoreNonUniformScaling", void 0);
+        __decorate([
             BABYLON.serializeAsVector3()
         ], TransformNode.prototype, "position", void 0);
         return TransformNode;
@@ -45070,6 +45080,14 @@ var BABYLON;
             },
             /**
              * Sets the transparency mode of the material.
+             *
+             * | Value | Type                                | Description |
+             * | ----- | ----------------------------------- | ----------- |
+             * | 0     | OPAQUE                              |             |
+             * | 1     | ALPHATEST                           |             |
+             * | 2     | ALPHABLEND                          |             |
+             * | 3     | ALPHATESTANDBLEND                   |             |
+             *
              */
             set: function (value) {
                 if (this._transparencyMode === value) {

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


+ 28 - 10
dist/preview release/es6.js

@@ -12036,7 +12036,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "3.3.0-alpha.2";
+                return "3.3.0-alpha.3";
             },
             enumerable: true,
             configurable: true
@@ -18437,6 +18437,11 @@ var BABYLON;
             _this.billboardMode = TransformNode.BILLBOARDMODE_NONE;
             _this.scalingDeterminant = 1;
             _this.infiniteDistance = false;
+            /**
+             * Gets or sets a boolean indicating that non uniform scaling (when at least one component is different from others) should be ignored.
+             * By default the system will update normals to compensate
+             */
+            _this.ignoreNonUniformScaling = false;
             _this.position = BABYLON.Vector3.Zero();
             _this._localWorld = BABYLON.Matrix.Zero();
             _this._worldMatrix = BABYLON.Matrix.Zero();
@@ -18948,7 +18953,7 @@ var BABYLON;
             if (this._nonUniformScaling === value) {
                 return false;
             }
-            this._nonUniformScaling = true;
+            this._nonUniformScaling = value;
             return true;
         };
         /**
@@ -19203,14 +19208,16 @@ var BABYLON;
                 this._worldMatrix.multiplyToRef(this._pivotMatrixInverse, this._worldMatrix);
             }
             // Normal matrix
-            if (this.scaling.isNonUniform) {
-                this._updateNonUniformScalingState(true);
-            }
-            else if (this.parent && this.parent._nonUniformScaling) {
-                this._updateNonUniformScalingState(this.parent._nonUniformScaling);
-            }
-            else {
-                this._updateNonUniformScalingState(false);
+            if (!this.ignoreNonUniformScaling) {
+                if (this.scaling.isNonUniform) {
+                    this._updateNonUniformScalingState(true);
+                }
+                else if (this.parent && this.parent._nonUniformScaling) {
+                    this._updateNonUniformScalingState(this.parent._nonUniformScaling);
+                }
+                else {
+                    this._updateNonUniformScalingState(false);
+                }
             }
             this._afterComputeWorldMatrix();
             // Absolute position
@@ -19354,6 +19361,9 @@ var BABYLON;
             BABYLON.serialize()
         ], TransformNode.prototype, "infiniteDistance", void 0);
         __decorate([
+            BABYLON.serialize()
+        ], TransformNode.prototype, "ignoreNonUniformScaling", void 0);
+        __decorate([
             BABYLON.serializeAsVector3()
         ], TransformNode.prototype, "position", void 0);
         return TransformNode;
@@ -45070,6 +45080,14 @@ var BABYLON;
             },
             /**
              * Sets the transparency mode of the material.
+             *
+             * | Value | Type                                | Description |
+             * | ----- | ----------------------------------- | ----------- |
+             * | 0     | OPAQUE                              |             |
+             * | 1     | ALPHATEST                           |             |
+             * | 2     | ALPHABLEND                          |             |
+             * | 3     | ALPHATESTANDBLEND                   |             |
+             *
              */
             set: function (value) {
                 if (this._transparencyMode === value) {

+ 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.2",
+    "version": "3.3.0-alpha.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 11 - 0
dist/preview release/gui/babylon.gui.d.ts

@@ -2234,6 +2234,17 @@ declare module BABYLON.GUI {
         protected _currentMaterial: Material;
         private _facadeTexture;
         private _content;
+        private _contentResolution;
+        private _contentScaleRatio;
+        /**
+         * Gets or sets the texture resolution used to render content (512 by default)
+         */
+        contentResolution: int;
+        /**
+         * Gets or sets the texture scale ratio used to render content (2 by default)
+         */
+        contentScaleRatio: number;
+        private _resetContent();
         /**
          * Creates a new button
          * @param name defines the control name

+ 47 - 3
dist/preview release/gui/babylon.gui.js

@@ -7395,6 +7395,8 @@ var BABYLON;
              */
             function Button3D(name) {
                 var _this = _super.call(this, name) || this;
+                _this._contentResolution = 512;
+                _this._contentScaleRatio = 2;
                 // Default animations
                 _this.pointerEnterAnimation = function () {
                     if (!_this.mesh) {
@@ -7419,6 +7421,47 @@ var BABYLON;
                 };
                 return _this;
             }
+            Object.defineProperty(Button3D.prototype, "contentResolution", {
+                /**
+                 * Gets or sets the texture resolution used to render content (512 by default)
+                 */
+                get: function () {
+                    return this._contentResolution;
+                },
+                set: function (value) {
+                    if (this._contentResolution === value) {
+                        return;
+                    }
+                    this._contentResolution = value;
+                    this._resetContent();
+                },
+                enumerable: true,
+                configurable: true
+            });
+            Object.defineProperty(Button3D.prototype, "contentScaleRatio", {
+                /**
+                 * Gets or sets the texture scale ratio used to render content (2 by default)
+                 */
+                get: function () {
+                    return this._contentScaleRatio;
+                },
+                set: function (value) {
+                    if (this._contentScaleRatio === value) {
+                        return;
+                    }
+                    this._contentScaleRatio = value;
+                    this._resetContent();
+                },
+                enumerable: true,
+                configurable: true
+            });
+            Button3D.prototype._resetContent = function () {
+                if (this._facadeTexture) {
+                    this._facadeTexture.dispose();
+                    this._facadeTexture = null;
+                }
+                this.content = this._content;
+            };
             Object.defineProperty(Button3D.prototype, "content", {
                 /**
                  * Gets or sets the GUI 2D content used to display the button's facade
@@ -7430,10 +7473,11 @@ var BABYLON;
                     if (!this._host || !this._host.utilityLayer) {
                         return;
                     }
+                    this._content = value;
                     if (!this._facadeTexture) {
-                        this._facadeTexture = new BABYLON.GUI.AdvancedDynamicTexture("Facade", 512, 512, this._host.utilityLayer.utilityLayerScene, true, BABYLON.Texture.TRILINEAR_SAMPLINGMODE);
-                        this._facadeTexture.rootContainer.scaleX = 2;
-                        this._facadeTexture.rootContainer.scaleY = 2;
+                        this._facadeTexture = new BABYLON.GUI.AdvancedDynamicTexture("Facade", this._contentResolution, this._contentResolution, this._host.utilityLayer.utilityLayerScene, true, BABYLON.Texture.TRILINEAR_SAMPLINGMODE);
+                        this._facadeTexture.rootContainer.scaleX = this._contentScaleRatio;
+                        this._facadeTexture.rootContainer.scaleY = this._contentScaleRatio;
                         this._facadeTexture.premulAlpha = true;
                     }
                     this._facadeTexture.addControl(value);

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


+ 11 - 0
dist/preview release/gui/babylon.gui.module.d.ts

@@ -2239,6 +2239,17 @@ declare module BABYLON.GUI {
         protected _currentMaterial: Material;
         private _facadeTexture;
         private _content;
+        private _contentResolution;
+        private _contentScaleRatio;
+        /**
+         * Gets or sets the texture resolution used to render content (512 by default)
+         */
+        contentResolution: int;
+        /**
+         * Gets or sets the texture scale ratio used to render content (2 by default)
+         */
+        contentScaleRatio: number;
+        private _resetContent();
         /**
          * Creates a new button
          * @param name defines the control name

+ 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.2",
+    "version": "3.3.0-alpha.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 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.2",
+    "version": "3.3.0-alpha.3",
     "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.2",
+    "version": "3.3.0-alpha.3",
     "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.2"
+        "babylonjs-gltf2interface": "3.3.0-alpha.3"
     },
     "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.2",
+    "version": "3.3.0-alpha.3",
     "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.2",
+    "version": "3.3.0-alpha.3",
     "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.2",
+    "version": "3.3.0-alpha.3",
     "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.2",
+    "version": "3.3.0-alpha.3",
     "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.2"
+        "babylonjs-gltf2interface": "3.3.0-alpha.3"
     },
     "peerDependencies": {
         "babylonjs": ">=3.2.0-alpha"

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


+ 28 - 10
dist/preview release/viewer/babylon.viewer.max.js

@@ -12157,7 +12157,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "3.3.0-alpha.2";
+                return "3.3.0-alpha.3";
             },
             enumerable: true,
             configurable: true
@@ -18558,6 +18558,11 @@ var BABYLON;
             _this.billboardMode = TransformNode.BILLBOARDMODE_NONE;
             _this.scalingDeterminant = 1;
             _this.infiniteDistance = false;
+            /**
+             * Gets or sets a boolean indicating that non uniform scaling (when at least one component is different from others) should be ignored.
+             * By default the system will update normals to compensate
+             */
+            _this.ignoreNonUniformScaling = false;
             _this.position = BABYLON.Vector3.Zero();
             _this._localWorld = BABYLON.Matrix.Zero();
             _this._worldMatrix = BABYLON.Matrix.Zero();
@@ -19069,7 +19074,7 @@ var BABYLON;
             if (this._nonUniformScaling === value) {
                 return false;
             }
-            this._nonUniformScaling = true;
+            this._nonUniformScaling = value;
             return true;
         };
         /**
@@ -19324,14 +19329,16 @@ var BABYLON;
                 this._worldMatrix.multiplyToRef(this._pivotMatrixInverse, this._worldMatrix);
             }
             // Normal matrix
-            if (this.scaling.isNonUniform) {
-                this._updateNonUniformScalingState(true);
-            }
-            else if (this.parent && this.parent._nonUniformScaling) {
-                this._updateNonUniformScalingState(this.parent._nonUniformScaling);
-            }
-            else {
-                this._updateNonUniformScalingState(false);
+            if (!this.ignoreNonUniformScaling) {
+                if (this.scaling.isNonUniform) {
+                    this._updateNonUniformScalingState(true);
+                }
+                else if (this.parent && this.parent._nonUniformScaling) {
+                    this._updateNonUniformScalingState(this.parent._nonUniformScaling);
+                }
+                else {
+                    this._updateNonUniformScalingState(false);
+                }
             }
             this._afterComputeWorldMatrix();
             // Absolute position
@@ -19475,6 +19482,9 @@ var BABYLON;
             BABYLON.serialize()
         ], TransformNode.prototype, "infiniteDistance", void 0);
         __decorate([
+            BABYLON.serialize()
+        ], TransformNode.prototype, "ignoreNonUniformScaling", void 0);
+        __decorate([
             BABYLON.serializeAsVector3()
         ], TransformNode.prototype, "position", void 0);
         return TransformNode;
@@ -45191,6 +45201,14 @@ var BABYLON;
             },
             /**
              * Sets the transparency mode of the material.
+             *
+             * | Value | Type                                | Description |
+             * | ----- | ----------------------------------- | ----------- |
+             * | 0     | OPAQUE                              |             |
+             * | 1     | ALPHATEST                           |             |
+             * | 2     | ALPHABLEND                          |             |
+             * | 3     | ALPHATESTANDBLEND                   |             |
+             *
              */
             set: function (value) {
                 if (this._transparencyMode === value) {

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

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-viewer",
     "description": "A simple-to-use viewer based on BabylonJS to display 3D elements natively",
-    "version": "3.3.0-alpha.2",
+    "version": "3.3.0-alpha.3",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

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

@@ -23,6 +23,7 @@
 - AnimationGroup has now onAnimationGroupEnd observable ([RaananW](https://github.com/RaananW))
 - Pointer drag behavior to enable drag and drop with mouse or 6dof controller on a mesh ([TrevorDev](https://github.com/TrevorDev))
 - Gizmo class used to manipulate meshes in a scene, position gizmo ([TrevorDev](https://github.com/TrevorDev))
+- Added a new `mesh.ignoreNonUniformScaling` to turn off non uniform scaling compensation ([Deltakosh](https://github.com/deltakosh))
 
 ### glTF Loader
 

+ 48 - 4
gui/src/3D/controls/button3D.ts

@@ -7,8 +7,50 @@ module BABYLON.GUI {
     export class Button3D extends Control3D {
         /** @hidden */
         protected _currentMaterial: Material;
-        private _facadeTexture: AdvancedDynamicTexture;
+        private _facadeTexture: Nullable<AdvancedDynamicTexture>;
         private _content: Control;
+        private _contentResolution = 512;
+        private _contentScaleRatio = 2;
+
+        /**
+         * Gets or sets the texture resolution used to render content (512 by default)
+         */
+        public get contentResolution(): int {
+            return this._contentResolution;
+        }
+
+        public set contentResolution(value: int) {
+            if (this._contentResolution === value) {
+                return;
+            }
+
+            this._contentResolution = value;
+            this._resetContent();
+        }
+
+        /**
+         * Gets or sets the texture scale ratio used to render content (2 by default)
+         */
+        public get contentScaleRatio(): number {
+            return this._contentScaleRatio;
+        }
+
+        public set contentScaleRatio(value: number) {
+            if (this._contentScaleRatio === value) {
+                return;
+            }
+
+            this._contentScaleRatio = value;
+            this._resetContent();
+        }        
+
+        private _resetContent() {
+            if (this._facadeTexture) {
+                this._facadeTexture.dispose();
+                this._facadeTexture = null;
+            }
+            this.content = this._content;
+        }
 
         /**
          * Creates a new button
@@ -59,10 +101,12 @@ module BABYLON.GUI {
                 return;
             }
 
+            this._content = value;
+
             if (!this._facadeTexture) {
-                this._facadeTexture = new BABYLON.GUI.AdvancedDynamicTexture("Facade", 512, 512, this._host.utilityLayer.utilityLayerScene, true, BABYLON.Texture.TRILINEAR_SAMPLINGMODE);
-                this._facadeTexture.rootContainer.scaleX = 2;
-                this._facadeTexture.rootContainer.scaleY = 2;
+                this._facadeTexture = new BABYLON.GUI.AdvancedDynamicTexture("Facade", this._contentResolution, this._contentResolution, this._host.utilityLayer.utilityLayerScene, true, BABYLON.Texture.TRILINEAR_SAMPLINGMODE);
+                this._facadeTexture.rootContainer.scaleX = this._contentScaleRatio;
+                this._facadeTexture.rootContainer.scaleY = this._contentScaleRatio;
                 this._facadeTexture.premulAlpha = true;
             }
             

+ 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.2",
+    "version": "3.3.0-alpha.3",
     "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.2";
+            return "3.3.0-alpha.3";
         }
 
         // Updatable statics so stick with vars here

+ 16 - 7
src/Mesh/babylon.transformNode.ts

@@ -34,6 +34,13 @@ module BABYLON {
         @serialize()
         public infiniteDistance = false;
 
+        /**
+         * Gets or sets a boolean indicating that non uniform scaling (when at least one component is different from others) should be ignored.
+         * By default the system will update normals to compensate
+         */
+        @serialize()
+        public ignoreNonUniformScaling = false;        
+
         @serializeAsVector3()
         public position = Vector3.Zero();
 
@@ -585,7 +592,7 @@ module BABYLON {
                 return false;
             }
 
-            this._nonUniformScaling = true;
+            this._nonUniformScaling = value;
             return true;
         }
 
@@ -872,12 +879,14 @@ module BABYLON {
             }
 
             // Normal matrix
-            if (this.scaling.isNonUniform) {
-                this._updateNonUniformScalingState(true);
-            } else if (this.parent && (<TransformNode>this.parent)._nonUniformScaling) {
-                this._updateNonUniformScalingState((<TransformNode>this.parent)._nonUniformScaling);
-            } else {
-                this._updateNonUniformScalingState(false);
+            if (!this.ignoreNonUniformScaling) {
+                if (this.scaling.isNonUniform) {
+                    this._updateNonUniformScalingState(true);
+                } else if (this.parent && (<TransformNode>this.parent)._nonUniformScaling) {
+                    this._updateNonUniformScalingState((<TransformNode>this.parent)._nonUniformScaling);
+                } else {
+                    this._updateNonUniformScalingState(false);
+                }
             }
 
             this._afterComputeWorldMatrix();