Jump to content

Any Changes to PolygonMeshBuilder for 2.3?


Recommended Posts

Using this code

    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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...