3
votes

There is a basic way to create box3 in three.js. creating by min, max vector3.

I want to create a box3 composed of 8 vector3s.

I have tried '.setFromArray' method, but it was not effective for me. (It only compares the minimum and maximum x, y, z and produces box3)

Do you have an idea to create a box3 composed of 8 vector3s?

1

1 Answers

1
votes

Do you have an idea to create a box3 composed of 8 vector3s?

I suggest you use Box3.setFromPoints(). This will create an AABB enclosing all the 3D points in the given array.