Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Three.js : SVGRenderer?

Tags:

three.js

svg

I've browsed the source of three.js and I haven't seen any file related to SVG. I've only found CanvasRenderer and WebGLRenderer. So what about SVG ? I thought it was supported.

like image 346
Libert Piou Piou Avatar asked Feb 15 '23 01:02

Libert Piou Piou


1 Answers

  1. SVGRenderer is not part of the library -- it is part of the examples. SVGRenderer can be found in the examples/js/renderers/ directory.

  2. If you are rendering with WebGLRenderer, use SVGLoader to load .svg files. SVGLoader is located in the examples/js/loaders/ directory.

  3. For demos, see https://threejs.org/examples/?q=svg

three.js r.99

like image 78
WestLangley Avatar answered Feb 24 '23 02:02

WestLangley