Преглед изворни кода

Fix "No plane" error by making sure all polygons have planes.

Jacob Schatz пре 8 година
родитељ
комит
cf07335438
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);
         }