-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
SVGLoader: Improved style parsing #13787
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
Conversation
|
There is already: https://rawgit.com/mrdoob/three.js/dev/examples/webgl_loader_svg.html I don't think it makes sense to add an additional example that is more or less equivalent. |
|
I know this is confusing but... |
|
The changes to |
|
Hello I did not understand your comment :
You mean not passing it through three.js ? 😃 |
Yeah, |
|
Thanks! |
|
Hmm... After this PR, the current example is now all white. Any ideas? https://rawgit.com/mrdoob/three.js/dev/examples/webgl_loader_svg.html |
|
The code :
function parseStyle( node, style ) {
style.fill = node.style.fill;
}
should not erase style is there is no style on path tag.
And there is an extra comma which breaks the example under Chrome :
point.y + numbers[ 5 ],
);
i will correct that
2018-04-07 19:02 GMT+02:00 Mr.doob <[email protected]>:
… Hmm...
After this PR, the current example is now all white. Any ideas?
https://rawgit.com/mrdoob/three.js/dev/examples/webgl_loader_svg.html
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#13787 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAnz-6Jwkh29rDn_BPePM8DBcYiDcIyRks5tmPEbgaJpZM4TKF9o>
.
|
|
sorry not to have tested the main example for non regression :-(
2018-04-07 19:17 GMT+02:00 nicolas debeissat <[email protected]>:
… The code :
function parseStyle( node, style ) {
style.fill = node.style.fill;
}
should not erase style is there is no style on path tag.
And there is an extra comma which breaks the example under Chrome :
point.y + numbers[ 5 ],
);
i will correct that
2018-04-07 19:02 GMT+02:00 Mr.doob ***@***.***>:
> Hmm...
>
> After this PR, the current example is now all white. Any ideas?
>
> https://rawgit.com/mrdoob/three.js/dev/examples/webgl_loader_svg.html
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#13787 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAnz-6Jwkh29rDn_BPePM8DBcYiDcIyRks5tmPEbgaJpZM4TKF9o>
> .
>
|
…style being overriden by empty style on path tag, temp correction, more to come
Adding example
svg_load_and_renderwhich loads the SVG at the left of the screen, and renders it withSVGRendererat the right of the screen.Correct the loading of style defined on path tags. I will extend it to other tags concerned as I add examples.
It is only a start for working on SVG load and render.
It concerns feature request #13478 and #4429 (closed)