瀏覽代碼

warn the user if earcut was not found

Raanan Weber 7 年之前
父節點
當前提交
515d705f1e
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/Mesh/babylon.polygonMesh.ts

+ 4 - 0
src/Mesh/babylon.polygonMesh.ts

@@ -132,6 +132,10 @@ module BABYLON {
 
             this._points.add(points);
             this._outlinepoints.add(points);
+
+            if (typeof earcut === 'undefined') {
+                Tools.Warn("Earcut was not found, the polygon will not be built.")
+            }
         }
 
         addHole(hole: Vector2[]): PolygonMeshBuilder {