Skip to content

Conversation

@ndebeiss
Copy link
Contributor

@ndebeiss ndebeiss commented Apr 6, 2018

Adding example svg_load_and_render which loads the SVG at the left of the screen, and renders it with SVGRenderer at 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)

@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 6, 2018

@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 6, 2018

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.

@mrdoob
Copy link
Owner

mrdoob commented Apr 6, 2018

I know this is confusing but... SVGRenderer is not the most optimal way of rendering a SVG 😁

@mrdoob
Copy link
Owner

mrdoob commented Apr 6, 2018

The changes to SVGLoader look good though. Do you mind removing the example from this PR for now?

@mrdoob mrdoob added this to the r92 milestone Apr 6, 2018
@ndebeiss
Copy link
Contributor Author

ndebeiss commented Apr 7, 2018

Hello
Thanks for the comments. I agree it is more a test than an example but I only found jsunit and benchmarking in test directory. That way I quickly test both SVGLoader and SVGRenderer.
Although there might be persons who would like to see if they can add 3D features to their SVG models by passing it through three.js. I wrote JS for cloning and animating SVGs in 3D for people of ThisEqualsThat. There are lots of SVG pictures available, and it is not difficult to write and modify.
I will remove the test example from PR. There will be more corrections to both SVGLoader and SVGRenderer coming, if you want.

I did not understand your comment :

SVGRenderer is not the most optimal way of rendering a SVG

You mean not passing it through three.js ? 😃

@mrdoob
Copy link
Owner

mrdoob commented Apr 7, 2018

I did not understand your comment :

SVGRenderer is not the most optimal way of rendering a SVG

Yeah, SVGLoader converts a SVG to triangles. SVGRenderer renders these triangles as SVG 😵

@mrdoob mrdoob changed the title adding SVG load and render example SVGLoader: Improved style parsing Apr 7, 2018
@mrdoob mrdoob merged commit e78a874 into mrdoob:dev Apr 7, 2018
@mrdoob
Copy link
Owner

mrdoob commented Apr 7, 2018

Thanks!

@mrdoob
Copy link
Owner

mrdoob commented Apr 7, 2018

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

@ndebeiss
Copy link
Contributor Author

ndebeiss commented Apr 7, 2018 via email

@ndebeiss
Copy link
Contributor Author

ndebeiss commented Apr 7, 2018 via email

ndebeiss added a commit to ndebeiss/three.js that referenced this pull request Apr 7, 2018
…style being overriden by empty style on path tag, temp correction, more to come
ndebeiss added a commit to ndebeiss/three.js that referenced this pull request Apr 7, 2018
ndebeiss added a commit to ndebeiss/three.js that referenced this pull request Apr 7, 2018
ndebeiss added a commit to ndebeiss/three.js that referenced this pull request Apr 7, 2018
ndebeiss added a commit to ndebeiss/three.js that referenced this pull request Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants