After creating approximately 2500 meshes, I implemented an algorithm to determine the color of each mesh. The algorithm calculates a value based on the distance of each mesh to a "red-start" point, which then determines the final color.
However, the current outcome is not satisfactory - there is lagging and the corners appear rough. I am looking for a new approach to achieve the same color outcome using THREE.Shape and FragmentShader. Can you provide guidance on how to achieve this?
Final Objective:
Utilize a single mesh (THREE.Shape) to define the area that needs to be colored for performance optimization.
Ability to input multiple points where red is the maximum color intensity, transitioning to green as you move away from each point.
Allow for movement of these points.
Sections of the mesh between two or more points should display a color based on their distance from each point.
EDIT:
Here is the progress I have made in this jsfiddle.
SOLUTION: