My current project involves manipulating the x position of all coordinates on a single face of a cube. Here is my current method:
var wDepth = 200;
var hDepth = 200;
var geo = new THREE.CubeGeometry( 20, 40, 40, 20, wDepth, hDepth);
for ( var i = 0; i < wDepth; i++ ) {
for ( var j = 0; j < hDepth; j++ ){
var index = j * wDepth + i;
geo.vertices[index].x += heightData[ index ];
}
}
However, when I view my model, I notice that an entire row from the face is missing (only the first point on the last row is transformed). How can I adjust my iteration to cover the entire face of the cube so that I can access and modify all points?