'How to get the width/height/length of a mesh in THREE.js [closed]

I been researching various places about trying to get the width and height of a mesh but I have been able to find anything that works. I have a collada model that I imported and all I want to do is get the dimension of it in Webgl/Three.js Units so that I can calculate collision in my simple game. So how would I go about getting the width and height of a mesh in THREE.js?



Solution 1:[1]

If you're ok with a basic bounding box, you can use a THREE.Box3

let measure = new THREE.Vector3();
let box = colladaModel.getSize(measure);
console.log( measure );

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1