Hi,
That’s in the title, when I call ExtrudePolygon()
, I get a ReferenceError: earcut is undefined
.
Both on Babylon 6 and 7.
The last build (7.25.1) was downloaded today from the cdn https://cdn.babylonjs.com/babylon.js
.
It appears that the bug does not exist on Playground.
The source code for the function is:
function ExtrudePolygon(name, options, scene, earcutInjection) {
if (scene === void 0) { scene = null; }
if (earcutInjection === void 0) { earcutInjection = earcut; }
return CreatePolygon(name, options, scene, earcutInjection);
}
So no earcut
defined.
I suppose it is a global, or maybe an external package?
EDIT: Ok, so it seems that it depends on this package, but I found that it is a bit strange that it is not included in the BabylonJS bundle, particularly without any mention of it in the doc and the API reference.