浏览代码

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);
         }