I didn’t calculate. I have to admit that I didn’t think so much.This may require calculating a reasonable camera radius or scaling of box after user resize the browser.Just a crude example: https://www.babylonjs-playground.com/#6FBD14#1200
Now let’s invite our outstanding friend to have a look (sry ,I am not good at math)
What about the camera behavior @RaananW mentioned ? https://playground.babylonjs.com/#6FBD14#1201
I will probably need you to be more specific if you want a more specific answer
Want to create a playground with a model example? This way we can understand what you are referring to when you say that the scene is the red part, and the canvas is the white part.
Very impressive with babylon community and thanks for your kind help.
it’s sort of a problem to share the real code and the model varies. https://www.babylonjs-playground.com/#6FBD14#1193
this playground shows the main idea. It’s required to take a screenshot of the model only (box in the example) but in fact the whole scene is taken.
Do I understand correctly, that you want the model to cover all of the red part?
Is it always a box? is the canvas always quadratic? does it need to be full-screen, or is it ok if you take a screenshot of only the needed mesh(es) and ignore the others?