mapbox / earcut

The fastest and smallest JavaScript polygon triangulation library for your WebGL apps
ISC License
2.21k stars 207 forks source link

Triangulation error #162

Open Pessimistress opened 1 year ago

Pessimistress commented 1 year ago

Minimal reproduction using earcut@2.2.4 can be found here: https://codepen.io/Pessimistress/pen/yLGXvab

Sample polygon with 2 holes does not triangulate correctly:

image

Remove one hole:

image

Remove the other hole:

image