Hi,
Trying to center object to screen with zoom dynamically
var box = new THREE.Box3().setFromObject(scope.bars_object);
scope.bars_object.position.y = -box.getSize().y / 2 - 10;
scope.bars_object.position.z = -box.getSize().z ;
scope.bars_object_size = box.getSize();
scope.bars_object_max = box.max;
// console.log(scope.bars_object_size);
var dist = 400;
var height = box.getSize().y + 10;
console.info(height);
var fov = 2 * Math.atan( height / ( 2 * dist ) ) * ( 180 / Math.PI );
console.info(fov);
app.camera.fov = 45;//fov;
app.camera.position.z = height+(height/2);
how to make centered object with screen size based on click/trigger?