I am facing a challenge in applying a texture to a ringGeometry using three.js r67. The issue lies in orienting the texture correctly. My goal is to apply a specific texture to a ringGeometry mesh in a radial manner, where the blue end of the texture aligns with the inner circumference of the ring and the red end aligns with the outer circumference. Below is the relevant section of my code along with a link to a JSFiddle showcasing the example:
geometry = new THREE.RingGeometry(100, 192, 60);
material = new THREE.MeshPhongMaterial({ map: texture });
mesh = new THREE.Mesh(geometry, material);
scene.add(mesh);
I am struggling to achieve the desired radial flow of the texture, proper alignment with the ring's radial extent, and displaying the texture on both sides of the ring. I aim for a result similar to this:
Desired Texture Alignment
My understanding of UV mapping is limited, and while I provided an example texture, I wish to generalize the process for radial textures on rings.
Another user posed a similar question, but adapting their UV mapping solution to mine has proven challenging:
UV Mapping Challenge
Your assistance is greatly appreciated!