Hi everyone,
I’m trying to modify the source code of TorusGeometry in Three.js in order to make the rendered torus closed on both ends. I have looked at the source code of CylinderGeometry and I understand that the key point lies in how to generate the vertices, normals, and uvs for the end caps. However, I’m not sure how to proceed and implement this.
I have created a CodePen example that you can directly modify and run: https://codepen.io/laddishx/pen/dyLQbdQ
Could anyone please guide me on how to generate the vertices, normals, and uvs for the end caps properly? I would greatly appreciate any help or suggestions.
Thank you very much.