I’m working on a small site that has a very simple 3d animation in it. The model is extruded from an SVG file that is loaded using SVGLoader. I’d like to optimize loading speed and include the SVG as text into my threejs code so it doesn’t need to do separate http request but has it already loaded and so it can be executed instantly.
How would you go about this? Would it be easier if it was an STL?
I just want to get rid of that separate http request basically and include the model with the code.
@Mugen87 thanks I didn’t know about SVGLoader.parse() method! Isn’t it documented? I have also had the idea to log out the result of SVGLoader.load(file.svg) and save that into a JSON to bypass the SVGLoader.load() step. Will the SVGLoader.parse() only take SVG data URI though?