Finding length ,width,Height of the objects in an array in three js

Hi,
I have created some cubes and pushed them in an array
the array is goods[];
if i print goods[0].position.x i get the position of the cube
is there any way to find the length,height width of the selected object

Thanks in Advance

Hi!
Something like that: intersection[0].object.geometry.parameters.
.parameters contains some information, including geometry’s dimensional sizes.

3 Likes

Thank you soo much.
This works :slight_smile:

But this solution is specifically for box geometries.
If you use different geometries, then it’s better to use THREE.Box3() to get size.

I’m using BoxGeometry for creating the cubes
so in my case it works