Trying to load a .svg file into three.js as geometry


I’m using the SVGLoader and am getting an error:
Uncaught TypeError: THREE.SVGObject is not a constructor

Here’s the code:
var svg_manager = new THREE.SVGLoader();
var url = ‘brush.svg’;

function svg_loading_done_callback(doc) {
	var obj = new THREE.SVGObject(doc)

	function(){console.log("Loading SVG...");},
	function(){console.log("Error loading SVG!");

Am I loading the .svg incorrectly?


Have you included the SVGRenderer script?

If so, can you create a codepen or jsfiddle that shows the issue?

I did not include the SVGRenderer, no luck adding it tho.

I found this codepen that loads a .svg file to geometry by Joey Anuff: