浏览代码

Merge pull request #5040 from Bolloxim/fix-node-parent-cache

hasNewParent(true) which drastically improves performance.  Definitely needs review! :)
David Catuhe 7 年之前
父节点
当前提交
454b3af1d9
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 0
      dist/preview release/what's new.md
  2. 1 1
      src/babylon.node.ts

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

@@ -115,6 +115,7 @@
 - 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))
+- Improved performance of cached nodes but ensuring parent always updates cache. This removes failed isSynchronized test that meant computeWorldMatrix would always have to rebuild. On large scenes this could double framerate. ([Bolloxim](https://github.com/Bolloxim))
 
 ### glTF Loader
 

+ 1 - 1
src/babylon.node.ts

@@ -351,7 +351,7 @@
 
         /** @hidden */
         public isSynchronized(updateCache?: boolean): boolean {
-            var check = this.hasNewParent();
+            var check = this.hasNewParent(true);
 
             check = check || !this.isSynchronizedWithParent();