瀏覽代碼

Tiny optim

David Catuhe 7 年之前
父節點
當前提交
780d610f0c
共有 2 個文件被更改,包括 2 次插入4 次删除
  1. 1 3
      src/Mesh/babylon.transformNode.ts
  2. 1 1
      src/babylon.node.ts

+ 1 - 3
src/Mesh/babylon.transformNode.ts

@@ -212,9 +212,7 @@ module BABYLON {
             if (this._rotationQuaternion) {
                 if (!this._cache.rotationQuaternion.equals(this._rotationQuaternion))
                     return false;
-            }
-
-            if (!this._cache.rotation.equals(this._rotation))
+            } else if (!this._cache.rotation.equals(this._rotation))
                 return false;
 
             if (!this._cache.scaling.equals(this._scaling))

+ 1 - 1
src/babylon.node.ts

@@ -392,7 +392,7 @@
                 return false;
             }
 
-            if (!this.isSynchronizedWithParent()) {
+            if (this._parentNode && !this.isSynchronizedWithParent()) {
                 return false;
             }