thank you for your reply.

I get to the center but the object zoom is larger than the size of canva width

```
const ob = new Box3().setFromObject(group)
const center = ob.getCenter(new Vector3())
const size = ob.getSize(new Vector3())
camera.position.x = center.x
camera.position.y = center.y
const padding = 0, fov = camera.fov;
let aspectRatio = renderer.domElement.width / renderer.domElement.height;
let tanFOV = Math.tan(Math.PI * fov / 360);
let viewWidth = padding + size.x, viewHeight = padding + size.y;
//The distances are proportional to the view's with or height
let distanceH = viewWidth / 2 / (tanFOV * aspectRatio);
let distanceV = viewHeight / 2 / tanFOV;
if (aspectRatio > 1 != viewWidth > viewHeight) {
distanceH *= viewHeight / viewWidth;
distanceV *= viewWidth / viewHeight;
}
camera.position.z = Math.max(distanceH, distanceV) + ob.max.z;
```