What is the most efficient method for transforming this data array into a geometry? I am generating the array dynamically and have the option to create an object instead of an array. Any suggestions for improving this process would be greatly appreciated.
Data (x,y,z):
var data = [
[-500,0,-500],
[-496,0,-500],
[-492,0,-500],
//..
[488,0,496],
[492,0,496],
[496,0,496]
];
//data.length: 62500
Current Approach:
var geo = new THREE.Geometry();
for(i = 0; i < data.length; i++)
geo.vertices.push(data[i][0],data[i][1],data[i][2]);
Subsequently, I iterate through all vertices to create the faces required for a terrain (similar to the image below, but not flat).