-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: closePath command should set the current point to the initial point in the subpath #16
Comments
I'm also okay sun-setting this module in favor of your SVG. Does it do the same stuff? |
@pixi-essentials/svg generates a scene graph instead of generating a single large Graphics object. It supports a much wider (the widest?) feature set and is larger. But yeah, the base SVG concept is the same. |
Could you make a mode where is combines/flattens In addition to exploded graph? I see both as being useful and that actually was a feature request someone made here. If you flatten it avoids all the transforms but at the expense of flexibility, exploded view is much better for animation. |
A flattening mode would be severely limited w.r.t. the exploded view. It is impossible to support (which otherwise @pixi-essentials/svg already has):
From outside, however, From an API standpoint, I don't see how a flattened mode wouldn't be useful b/c @pixi-essentials/svg exposes a |
Maybe it's not that useful. What you describe would still allow users to do RenderTexture or cacheAsBitmap for performance, which is good. The only advantage of flattening is if you have a very complex SVG and then you'd need to allocate a large pixi scene graph. Whereas, representing it as pure geometry is probably more memory efficient as complexity scales. Overall, I like your approach better. What I'm describing is probably more of an edge-case and could be added later if there's a need. |
I used your code in @pixi-essentials/svg @bigtimebuddy. Haha, and got this strange bug that messed up my client's figures.
I realized it occurred at 'm' (relative) commands after 'Z' (closePath). It was because you aren't updating the current point after closing the path.
In the SVG specification (section 8.3.3), it says:
Just wanted to forward this fix from @pixi-essentials/svg to here.
(here
pixi-svg/src/SVG.js
Line 351 in 89e4ab8
The text was updated successfully, but these errors were encountered: