<a-box>

Note: This documentation is for the old 0.2.0 version of A-Frame. Check out the documentation for the current 1.6.0 version

The box primitive, formerly called <a-cube>, creates shapes such as boxes, cubes, or walls. It is an entity that prescribes the geometry with its geometric primitive set to box.

Example

<a-assets>
<img id="texture" src="texture.png">
</a-assets>

<!-- Basic box. -->
<a-box color="tomato" depth="2" height="4" width="0.5"></a-box>

<!-- Textured box. -->
<a-box src="#texture"></a-box>

Attributes

Note that the box primitive inherits common mesh attributes.

Attribute Component Mapping Default Value
depth geometry.depth 1
height geometry.height 1
width geometry.width 1