Create a new BoxGeometry instance.
By default, the constructor creates a box centered on the object space origin with a width, length and height of 1 unit and 1 segment in either axis (2 triangles per face). The box is created with UVs in the range of 0 to 1 on each face.
Optionalopts: {Options object.
OptionalcalculateTangents?: booleanGenerate tangent information. Defaults to false.
OptionalhalfExtents?: Vec3The half dimensions of the box in each axis. Defaults to [0.5, 0.5, 0.5].
OptionalheightSegments?: numberThe number of divisions along the Y axis of the box. Defaults to 1.
OptionallengthSegments?: numberThe number of divisions along the Z axis of the box. Defaults to 1.
OptionalwidthSegments?: numberThe number of divisions along the X axis of the box. Defaults to 1.
OptionalyOffset?: numberMove the box vertically by given offset in local space. Pass 0.5 to generate the box with pivot point at the bottom face. Defaults to 0.
A procedural box-shaped geometry.
Typically, you would: