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

Switched scene['_selectionOctree'] to scene.selectionOctree

Michael Schlotfeldt 8 лет назад
Родитель
Сommit
8bff6e0c91
1 измененных файлов с 3 добавлено и 2 удалено
  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);
             }
             }
         }
         }