I have been attempting to develop a configurator using three.js, but I am currently stuck at the stage where I need to dynamically change the color of the product. My initial idea was to use an SVG as a texture, modify the fill property of the SVG, and easily update the texture. However, I am not achieving satisfactory results.
My current setup includes:
- A 3D model with an SVG applied as a texture using a TextureLoader. The SVG is located in an external file ("images/texture.svg"). Additionally, I have noticed that three.js is reducing the size of the texture, which I believe could be a mapping issue.
- The SVG is divided into layers so that I can manually adjust the color and apply it.
However, my goal is to make this process dynamic - allowing users to choose a color and have it automatically update the SVG applied as a texture.
Any suggestions or ideas would be greatly appreciated!
Thank you!