Ver código fonte

Switched scene['_selectionOctree'] to scene.selectionOctree

Michael Schlotfeldt 7 anos atrás
pai
commit
8bff6e0c91
1 arquivos alterados com 3 adições e 2 exclusões
  1. 3 2
      src/Mesh/babylon.geometry.ts

+ 3 - 2
src/Mesh/babylon.geometry.ts

@@ -1059,8 +1059,9 @@
             mesh.computeWorldMatrix(true);
 
             // Octree
-            if (scene['_selectionOctree']) {
-                scene['_selectionOctree'].addMesh(<AbstractMesh>mesh);
+            const sceneOctree = scene.selectionOctree;
+            if (sceneOctree !== undefined && sceneOctree !== null) {
+                sceneOctree.addMesh(<AbstractMesh>mesh);
             }
         }