mrdoob/three.js — Issue #814: Viewing SVGs?
Author: gtg750x
Created: 2011-11-29 20:52:19+00:00
State: open

Hello,

I've been exploring Three.js for sometime and am quite impressed. Thanks for sharing such a great library.

I know that there is no import support for SVGs, but I am trying to figure out the best way to view a 2D SVG using Three.js. For testing, I converted the SVG into a PNG and applied it as a texture to a plane mesh which easily allowed pan and zoom with a camera and ambient light source. Worked nicely, but I can't use an SVG as a texture, so definite loss of resolution...

The reason we are interested in using three.js is because we are developing a web-based tool that allows for collaborative viewing of any sort of visual item (image, 3D model, etc.) while adding annotations, etc. Rather than making a 2D tool and a 3D tool (for example an SVG tool using svgpanzoom from Google code repo and a 3D tool using three.js ), we're trying to making it a single tool/set of code. I think my problem would be solved if there's anyway to set an SVG in space and then allow a camera to move around it, but I guess the concept of z position gets fuzzy since you could infinitely zoom into an SVG and never get behind it, like you do when applying a PNG texture to a plane...

I welcome any thoughts/criticism of the idea. If two tools is the way to go, let me know. Thanks for any help.

-- Danny