Can anyone help me figure out how to obtain the average x, y, z coordinates of a specific face in three.js? Or, could someone guide me on extracting the individual x, y, z coordinates of the three vertices that compose a face and averaging them?
Currently, I have this:
var fLength = plane.geometry.faces.length;
for (var i = 0; i < fLength; i++) {
var f = plane.geometry.faces[i];
//How can I retrieve the x, y, z coordinates of the current/i face?
//Is there a way to manipulate this face's position?
//Are there methods for extruding or performing any other operations on the face?
}
Furthermore, I am curious if there are alternative ways to move a face without directly manipulating its vertices. Is there a method for extruding faces as well? I know it's a lot of questions, but the whole process appears a bit unclear to me...