Да, кстати, последние 2 функции надо изменить:
function setCameraPositionOnVerticalRotation(radius,angle_inc_z){
angle_z += angle_inc_z;
var angle = angleTo2PiRange(angle_z);
if(angle.cos < 0){
angle_z -= angle_inc_z;
return;
}
angle_z = angle.angle;
camera.position.z = radius * Math.cos(angle_z) + objectCenter.z;
camera.position.y = radius * Math.sin(angle_z) + objectCenter.y;
//camera.position.x = objectCenter.x;
camera.lookAt(new THREE.Vector3(objectCenter.x,objectCenter.y,objectCenter.z));
/*
if(angle.cos < 0){
camera.rotation.z = 3.1416*2;
} else {
camera.rotation.z = 0;
}
*/
//camera.lookAt(new THREE.Vector3(objectCenter.x,objectCenter.y,objectCenter.z));
}
function setCameraPositionOnHorisontalRotation(radius,angle_inc_x){
angle_x += angle_inc_x;
var r = radius * Math.cos(angle_z);
var angle = angleTo2PiRange(angle_x);
//angle_x = angle.angle;
camera.position.x = r * Math.cos(angle_x) + objectCenter.x;
camera.position.z = r * Math.sin(angle_x) + objectCenter.z;
//camera.position.x = objectCenter.x;
camera.lookAt(new THREE.Vector3(objectCenter.x,objectCenter.y,objectCenter.z));
}