I am looking to generate multiple objects.
var distance = 10;
var geometry = new THREE.BoxGeometry(10,10,10);
var material = new THREE.MeshBasicMaterial({color:0x00ff44});
for(var i = 0; i < 4;i++){
var mesh = new THREE.Mesh(geometry, material);
mesh.position.z = distance;
scene.add(mesh);
distance += 5;
};`
While this code successfully creates objects, they are all in a single row. My goal is to create additional rows behind the initial row, resembling the layout in this image:
I aim to add more cubes at the Red X position.