Skip to main content

Box

Box is a primitive object that creates a box.

Syntax

<Box />

Parameters

All objects share the same base parameters from ComponentObjectProps.

NameTypeDescription
widthnumberThe width of the box.
heightnumberThe height of the box.
depthnumberThe depth of the box.
widthSegmentsnumberThe number of segments along the width of the box.
heightSegmentsnumberThe number of segments along the height of the box.
depthSegmentsnumberThe number of segments along the depth of the box.
radiusnumberThe radius of the box.
bloombooleanWhether use bloom effect.
colorColorTypeThe base color.
materialObjectMaterialMixThe material.

Example

<Box width={1} height={1} depth={1} position={[0, 2, 0]} />

Available on: Client Server