I am working with a mesh and have assigned vertex colors using the following code:
var vertColors = MyPolygonProto.polygons[iBorderCounter].polyMesh.geometry.colors;
vertColors[vertCount] = new THREE.Color(finalColor.r, finalColor.g, finalColor.b);
The polyMesh mentioned here is a mesh. My goal is to modify the colors of the faces based on their geometries.
I managed to follow the method described in this post: How to change face color in Three.js
However, it feels inefficient to iterate over the same vertices multiple times when they are shared by multiple faces. It would be more efficient if each face automatically extrapolated its color based on the colors of its vertices stored in the mesh.geometry.colors array.
Is there a feature in Three.js that allows for this kind of automatic interpolation?