Description:
My three.js scene is based upon a selection tool in which if we click and drag over the mesh it colors the triangles of the mesh red, I want to create a function that when runs checks the mesh.geometry.attributes
and if it finds a triangle with red color it extrudes that triangle.
I am not good at attribute transformation and modification so I would love to get an explanation as well as how to perform this action in detail.
Furthermore, here is the selection part:
The red part is the selected area, I want to perform the extrusion like this:
Thanks in advance for the help!
What I tried:
I tried multipying and adding the normal of the triangle and then triangulating the edges but seem to get errors or just scattering of all the triangles inside the mesh.