I have created a unique Rolex cube with varying layers along the "Z axis" and I need to adjust the camera position to preview the geometry accurately. How can I change the camera position by dragging the window and also manipulate individual cone rotations based on mouse events?
Here is my code snippet for reference: http://jsfiddle.net/sagh0900/gfraQ/8/
Please review the code on jsfiddle for a better understanding of my query:
for ( var i = 0; i <nSize; i++)
{
var k = i%10,
j = (i-k)/10;
j = j*2 - 10;
k = k*2 - 10;
var cone1 = lc_relationship.sensor1[i].Geometry;
scene.add(cone1);
var cone2 = lc_relationship.sensor2[i].Geometry;
scene.add(cone2);
var cone3 = lc_relationship.sensor3[i].Geometry;
scene.add(cone3);
cone1.position.set(j, k, lc_relationship.sensor1[i].z_cordinate);
cone2.position.set(j, k, lc_relationship.sensor2[i].z_cordinate);
cone3.position.set(j, k, lc_relationship.sensor3[i].z_cordinate);
}
If anyone could assist me in updating my jsfiddle or providing guidance, I would greatly appreciate it.
Thank you in advance.