Obj rendering on canvas as 3d file size

hi :wave:
i want rendering obj file on canvas

some 3d file is small so i need make perspectiveCamera more close
but some 3d file is big.
big 3dfile is rendered a part of image if use same perspectiveCamera

how can i controll perspectiveCamera as 3dfile image size

actually i m not good at english thanks to read this.

Fit bounding sphere:
https://yomotsu.github.io/camera-controls/examples/fit-to-bounding-sphere.html
Fit box:
https://yomotsu.github.io/camera-controls/examples/fit-and-padding.html
Github: