You are reading Tres v1 docs. Head over for V2 docs.
Skip to content
On this page

Box ^1.6.0

The cientos package provides a <Box /> component that serves as a short-cut for a BoxGeometry and a MeshBasicMaterial with a Mesh object.

args: [
  width: number,
  height: number,
  depth: number,
  widthSegments: number,
  heightSegments: number,
  depthSegments: number

Reference: BoxGeometry


<Box :args="[1, 1, 1]" color="orange" />

// Box with a custom material transformations
<Box ref="boxRef" :args="[1, 1, 1]" :position="[0, 4, 0]">
  <TresMeshToonMaterial color="orange" />