소스 검색

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 {