I'm currently diving into the world of ThreeJS and I am experimenting with loading collada files into a viewer. My journey began by replicating the code from the Elf colladaLoader demo.
I successfully managed to display the model inside an 800px square modal window, and it looks fantastic. However, I encountered an issue when attempting to load other .dae files - they do not appear centered.
The demo was clearly set up with precise configurations to ensure the object and camera are correctly positioned. Unfortunately, I cannot predict the files I will be loading in advance.
Is there a method to instruct the camera to focus directly on the object, centering it, and move it back enough to fill the entire container?