Currently, I am experimenting with three.js and have been following various tutorials to create a script that loads an object from an obj file. The script also adds a texture to the object and provides interactive features such as camera control and collision detection when the cursor interacts with the object on the screen.
While I know how to change the transparency of the entire object, I am now seeking a way to make the loaded object partially transparent based on the cursor's position. I am looking to increase the transparency of triangles near the collision point where the cursor intersects the object. This will allow me to see objects inside or behind the loaded object. Is there a method to achieve this effect? Perhaps someone can recommend a tutorial that demonstrates how to implement this in three.js?
I would greatly appreciate any help or guidance on this matter.