Browse Source

Switched scene['_selectionOctree'] to scene.selectionOctree

Michael Schlotfeldt 7 năm trước cách đây
mục cha
commit
8bff6e0c91
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      src/Mesh/babylon.geometry.ts

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

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