Browse Source

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

David Catuhe 5 years ago
parent
commit
ae9463bcaa
3 changed files with 2 additions and 15 deletions
  1. 0 4
      src/Maths/math.vector.ts
  2. 1 10
      src/Meshes/abstractMesh.ts
  3. 1 1
      src/Meshes/transformNode.ts

+ 0 - 4
src/Maths/math.vector.ts

@@ -1145,10 +1145,6 @@ export class Vector3 {
             return true;
         }
 
-        if (absY !== absZ) {
-            return true;
-        }
-
         return false;
     }
 

+ 1 - 10
src/Meshes/abstractMesh.ts

@@ -845,16 +845,7 @@ export class AbstractMesh extends TransformNode implements IDisposable, ICullabl
 
     /** @hidden */
     public _markSubMeshesAsMiscDirty() {
-        if (!this.subMeshes) {
-            return;
-        }
-
-        for (var subMesh of this.subMeshes) {
-            var material = subMesh.getMaterial();
-            if (material) {
-                material.markAsDirty(Constants.MATERIAL_MiscDirtyFlag);
-            }
-        }
+        this._markSubMeshesAsDirty((defines) => defines.markAsMiscDirty());
     }
 
     /**

+ 1 - 1
src/Meshes/transformNode.ts

@@ -1142,7 +1142,7 @@ export class TransformNode extends Node {
 
         // Normal matrix
         if (!this.ignoreNonUniformScaling) {
-            if (this._scaling.isNonUniform) {
+            if (this._scaling.isNonUniformWithinEpsilon(0.000001)) {
                 this._updateNonUniformScalingState(true);
             } else if (parent && (<TransformNode>parent)._nonUniformScaling) {
                 this._updateNonUniformScalingState((<TransformNode>parent)._nonUniformScaling);