I'm currently using a raycaster to determine the face of a cube and then apply color to it following this method:
const colorAttribute = intersected.object.geometry.getAttribute('color');
colorAttribute.setXYZ(face.a, color.r, color.g, color.b);
colorAttribute.setXYZ(face.b, color.r, color.g, color.b);
colorAttribute.setXYZ(face.c, color.r, color.g, color.b);
colorAttribute.needsUpdate = true;
However, there seems to be an issue with the face not being completely painted over. Can anyone provide assistance? https://jsfiddle.net/kirill321592/fjdxpos1/43/