You will need to rework the whole thing for SVG spec compliance when you get to implementing fill rules. The spec mandates that you handle winding vs. even-odd properly. Probably best to do it sooner rather than later, IMO.
-
-
Yeah. I already found some svgs that earcut can't handle. SVG is like COLLADA, we won't support it fully, but we'll have decent support with performant and maintainable code. Enjoying the luxury of not being a browser
2 replies 0 retweets 1 like -
libTess is the gold standard for polygon tessellation. A JS port is available:https://github.com/brendankenny/libtess.js/ …
2 replies 0 retweets 1 like -
Replying to @Vector_GL @mrdoob and
No it's not.Maybe 10 years ago it was) ) Try
#mapbox earcut.1 reply 0 retweets 0 likes -
Replying to @SasMaster1980 @mrdoob and
It looks very good, but I need a constrained Delaunay triangulation solution. I also use libTess for its robust boundary contour operations for clipping and booleans.
3 replies 0 retweets 0 likes -
Replying to @Vector_GL @mrdoob and
But that's of course only helpful if you use stencil coverage technique.
1 reply 0 retweets 0 likes -
Replying to @SasMaster1980 @mrdoob and
I’ve implemented stencil and cover as it’s so easy and elegant. You’re limited to MSAA though, which is too limiting for me.
2 replies 0 retweets 0 likes -
Replying to @Vector_GL @mrdoob and
'Very complex ' - I mean self intersecting polygons ,I used it for glyps triangulation several years ago. Not a food choice it was :/
1 reply 0 retweets 0 likes -
Replying to @SasMaster1980 @mrdoob and
Did you use libTess2? My experience is the opposite to yours ;-)
1 reply 0 retweets 0 likes -
Replying to @Vector_GL @mrdoob and
Yes I did. And whole lot of other tess libs. But then I moved to stencil coverage approach and see no reason looking back. Nvidia path extension uses same approach and it works great quality and performance wise.
2 replies 0 retweets 0 likes
I found that stencil and cover works great for fonts (Pathfinder uses it for small fonts—well, a modification of it that allows for “perfect” analytic AA), but no so great for complex SVG, where you really don’t want to change state so often and want to avoid overdraw.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.