Closed xahon closed 1 year ago
I have a arrow-like polygon
Positions are [(-1, -1, 0), (-0.45, 0.45, 0), (1, 1, 0), (-1, 1, 0)] in that order
[(-1, -1, 0), (-0.45, 0.45, 0), (1, 1, 0), (-1, 1, 0)]
When I pass these points (in that order) to earcut it returns me 6 indices which match these triangles (circle is starting point, red first, yellow second)
Indices are [2, 0, 1, 1, 3, 2]
[2, 0, 1, 1, 3, 2]
And I get this shape in the end
I'm unable to reproduce the issue. Using x and y of your input i get the following result:
Sorry, my bad. I was indexing into wrong array with earcut's indices
I have a arrow-like polygon
Positions are
[(-1, -1, 0), (-0.45, 0.45, 0), (1, 1, 0), (-1, 1, 0)]
in that orderWhen I pass these points (in that order) to earcut it returns me 6 indices which match these triangles (circle is starting point, red first, yellow second)
Indices are
[2, 0, 1, 1, 3, 2]
And I get this shape in the end