You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While earcut is great for single polygon calculations, for multipolygon cases it could provide advanced API for more efficient working with Arrays:
provide input params to work on data range for input data so earcut can work on single big user-pre-allocated array taking its slices (dStar, dEnd)
provide input params to work on user pre-allocated triangles array as well, saving the results on specified offset and with correct index pointing to the data array being worked from dStart and dEnd.
return new offset from writing new indices into the triangles.
all above is enabling to efficiently earcut hundreds of thousands polygons and passing the resulting arrays directly into the WebGL buffers.
While earcut is great for single polygon calculations, for multipolygon cases it could provide advanced API for more efficient working with Arrays:
all above is enabling to efficiently earcut hundreds of thousands polygons and passing the resulting arrays directly into the WebGL buffers.
I did that as experiment and saved hundreds of ms in total (for all polygons processing). Branch of this approach available here : https://github.com/Sumbera/earcut/tree/multipolygon
The text was updated successfully, but these errors were encountered: