Browse Source

warn the user if earcut was not found

Raanan Weber 7 years ago
parent
commit
515d705f1e
1 changed files with 4 additions and 0 deletions
  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 {