Import Mesh with same camera settings

Hey,
Currently I am working on a project that needs to adjust it’s camera properties according to imported model, If I have to import BoomBox from Babylon Library it’s camera settings code should not be hard coded. Is there any way to develop a program that displays a model just like in sandbox with auto adjustment of camera properties. I am working first with babylon meshes library marble. and then with BoomBox . Kindly help me out.

Not sure if the sandbox does it the same way, but i remember the BabylonViewer not adjusting the camera but instead rescaling the imported model using normalizeToUnitCube on the root mesh, maybe that helps. Mesh | Babylon.js Documentation

The sandbox is using this code:
Babylon.js/renderingZone.tsx at master · BabylonJS/Babylon.js (github.com)

which is simply using the camera behavior:
Camera Behaviors | Babylon.js Documentation