ソースを参照

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 {