Hi! Thanks!
Working with dimensions and position is the approach I have chosen.
Basically I set up the position and the camera in base to the model sizes in this way:
const box = new THREE.Box3().setFromObject(model);
const size = box.getSize(new THREE.Vector3()).length();
const center = box.getCenter(new THREE.Vector3());
this.controls.reset();
model.position.x += (model.position.x - center.x);
model.position.y += (model.position.y - center.y);
model.position.z += (model.position.z - center.z);
this.controls.maxDistance = size * 10;
this.controls.minDistance = size;
this.camera.near = size / 100;
this.camera.far = size * 100;
this.camera.updateProjectionMatrix();
this.camera.position.copy(center);
this.camera.lookAt(center);
I found this solution here:
@ExoGeN and @vielzutun.ch thanks for your advices and for the fast replies, much appreciated.
Regards, Davide