Using this code
//leaf
var r;
var leaf_path = new BABYLON.Path2(0, 0);
for (var i = Math.PI/6 + Math.PI/48; i <= 5*Math.PI/6; i+= Math.PI/48) {
r = 1- Math.sin(3*i);
leaf_path.addLineTo(r*Math.cos(i), r*Math.sin(i));
}
var leaf_shape = new BABYLON.PolygonMeshBuilder("polygon", leaf_path, scene).build();
leaf_shape.rotation.x = -Math.PI / 2;
leaf_shape.material = mat0;
in the playground works great.
The same code in my project (using BJS 2.3) does not work and I get the error message
uncaught exception: PolygonMeshBuilder cannot be used because poly2tri is not referenced
has something changed in 2.3