I'm currently dealing with a lot of 3d models and I find that many of the models are centered off the center of the model. Is there a way to get the length (x), width (z), height (y) of the model, and divide it by two to calculate the confidence position of the model?
let loaderDae = new ColladaLoader();
loaderDae.load(`model.dae`, (dae: any) => {
this.buildingModel = dae.scene;
// Is there a way to get the length, width and height of the model and calculate the center point?
this.buildingModel.position.set(x_length/2, y_length/2, z_length/2);
this.sceneS.add(this.buildingModel);
});

Create a bounding box then get the size of the bounding box with
getSize()For the avoidance of doubt, this code should work with all supported 3D model file types.