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

Merge pull request #1701 from jschatz1/fix-no-plane-error

Fix "No plane" error by making sure all polygons have planes.
David Catuhe 8 лет назад
Родитель
Сommit
fca66a3a18
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/Mesh/babylon.csg.ts

+ 1 - 1
src/Mesh/babylon.csg.ts

@@ -159,7 +159,7 @@
         }
 
         public clone(): Polygon {
-            var vertices = this.vertices.map(v => v.clone());
+            var vertices = this.vertices.map(v => v.clone()).filter(v => v.plane);
             return new Polygon(vertices, this.shared);
         }