Skip to content
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

Support for SVG #24

Open
LukeTOBrien opened this issue Jun 24, 2020 · 1 comment
Open

Support for SVG #24

LukeTOBrien opened this issue Jun 24, 2020 · 1 comment

Comments

@LukeTOBrien
Copy link

LukeTOBrien commented Jun 24, 2020

Hello there,

I am working on an app where I am using SVG data extensively and the <use> tag.
At the moment though it doesn't seem like SVG is supported in your library.
The following for eg does not render:
CodePen

<a-scene >
  <a-entity htmlembed="" position="0 1.75 -.5">
<svg id="svg" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
  <circle cx="50" cy="50" r="50"/>
</svg>
 </a-entity>
</a-scene>

Is there any chance you might add support for this?

@LukeTOBrien
Copy link
Author

I have just modified my example to add a heading, and the circle magically appears.
So I guess is the SVG is the single element then the SVG does not render, but if there are multiple elements, then the SVG does render??

This renders the circle, but remove the <h1> and the circle does not render.

<a-scene >
  <a-entity htmlembed="" position="0 1.75 -.5">
    <h1>SVG!<h1>
<svg id="svg" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
  <circle cx="50" cy="50" r="50"/>
</svg>
 </a-entity>
</a-scene>

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

No branches or pull requests

1 participant