Reputation: 31
I am not sue of this is even possible but instead of setting a texture to a jpg like THREE.TextureLoader().load('./texture1.jpg')
I want to set the texture to an INLINE SVG (I want to animate with javascript GSAP).
Is this possible? Probably not :(
Upvotes: 2
Views: 549
Reputation: 31076
Sorry, it's not. You can't use a SVG file as a texture. However, you can load SVG files in three.js
via THREE.SVGLoader and then create shape meshes from the resulting path data.
But keep in mind this is a one-time operation. If you animate the SVG, you won't see any effect after the loading process.
Upvotes: 2