How does Three.js use ColladaLoader to introduce external models to center?

The

code is as follows. After introducing the model using ColladaLoader, I don"t know how to use Geometry or how to get the size of the model.

var loader = new THREE.ColladaLoader();
var mesh;
loader.load("dae/LuckyStrike/luckystrike.dae", function (result) {
    mesh = result.scene.children[0].clone();
    // 
    // mesh.position.set(-1.4,-1,-.5)
    scene.add(mesh);
});
May.04,2022

self-question and answer, found a way! You can get the midpoint by calculating max-min using the newTHREE.Box3 () function.

loader.load( daeUrl, function (result) {
  mesh = result.scene
  let scaleNum = 1
  let box = new THREE.Box3().setFromObject(mesh);
  //   
  mesh.position.set((-box.max.x - box.min.x) * scaleNum * 20, (-box.max.y - box.min.y) * scaleNum * 20, (-box.max.z - box.min.z) * scaleNum * 20)
  // 
  mesh.scale.set(scaleNum, scaleNum, scaleNum);
  scene.add(mesh);
})
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2bb2e-4e720.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2bb2e-4e720.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?