Project: Paper2D

Not exactly. It splits spline up into individual segments based on rules, and then assigns sprites to each segment to fill up length. Once that is done, it stretches sprites so they fill full distance, and deforms them to match local NBT frame of spline at projected offset (for each X position in sprite vertex data, figure out local frame and loft Y accordingly). deformed sprites are written into a local list of triangles, it doesn’t actually use a separate sprite component for each element on list. You can still end up with some funky results for tight curves on spline, so I’m open to suggestions on a better approach. At least I’d like to detect overlap in those cases and resolve it by splitting difference.

perimeter doesn’t do any triangulation at all, but interior uses editor triangulation code which works via ear clipping. I’d like to switch to a better algorithm like Delaunay to avoid creating sliver triangles, but haven’t had a chance yet to try something better.

sprite editor when set to fully custom also uses same ear clipping algorithm for triangulation to generate render results or collision meshes.

Cheers,