mapbox / earcut.hpp

Fast, header-only polygon triangulation
ISC License
858 stars 133 forks source link

Don't discard unused vertices #9

Closed jfirebaugh closed 9 years ago

jfirebaugh commented 9 years ago

Discarding unused vertices makes earcut.hpp output unworkable for mapbox-gl-native due to the following:

The JS implementation does not remove unused vertices.

cc @mourner @kkaefer to double check my logic.

mourner commented 9 years ago

Yes, after I switched the JS implementation to indexed output, the output indices now reference the original input array. Unused vertices are a rare occurrence anyway, and reusing the input array makes performance better.

jfirebaugh commented 9 years ago

Fixed by #10.