Просмотр исходного кода

Merge pull request #4985 from Bolloxim/fix-isSyncronized-gc-perf

Improved _isSyncronized performance in computeWorldMatrix
David Catuhe 7 лет назад
Родитель
Сommit
59bdeee4be
2 измененных файлов с 3 добавлено и 2 удалено
  1. 1 0
      dist/preview release/what's new.md
  2. 2 2
      src/Mesh/babylon.transformNode.ts

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

@@ -107,6 +107,7 @@
 - Added EdgesLineRenderer to address [#4919](https://github.com/BabylonJS/Babylon.js/pull/4919) ([barteq100](https://github.com/barteq100))
 - Added ```ambientTextureImpactOnAnalyticalLights``` in PBRMaterial to allow fine grained control of the AmbientTexture on the analytical diffuse light ([sebavan](http://www.github.com/sebavan))
 - BoundingBoxGizmo scalePivot field that can be used to always scale objects from the bottom ([TrevorDev](https://github.com/TrevorDev))
+- Improved _isSyncronized performance and reduced GC in TransformNode.computeWorldMatrix by directly reading property. ([Bolloxim](https://github.com/Bolloxim))
 - Added supports for reflectionMatrix in Skybox Mode Cube Texture allowing offsetting the world center or rotating the matrix ([sebavan](http://www.github.com/sebavan))
 
 ### glTF Loader

+ 2 - 2
src/Mesh/babylon.transformNode.ts

@@ -229,8 +229,8 @@ module BABYLON {
             if (!this._cache.position.equals(this.position))
                 return false;
 
-            if (this.rotationQuaternion) {
-                if (!this._cache.rotationQuaternion.equals(this.rotationQuaternion))
+            if (this._rotationQuaternion) {
+                if (!this._cache.rotationQuaternion.equals(this._rotationQuaternion))
                     return false;
             }