<a-box>

The box primitive creates shapes such as boxes, cubes, or walls.

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

Attribute Component Mapping Default Value
ambient-occlusion-map material.ambientOcclusionMap None
ambient-occlusion-map-intensity material.ambientOcclusionMapIntensity 1
ambient-occlusion-texture-offset material.ambientOcclusionTextureOffset 0 0
ambient-occlusion-texture-repeat material.ambientOcclusionTextureRepeat 1 1
color material.color #FFF
depth geometry.depth 1
displacement-bias material.displacementBias 0.5
displacement-map material.displacementMap None
displacement-scale material.displacementScale 1
displacement-texture-offset material.displacementTextureOffset 0 0
displacement-texture-repeat material.displacementTextureRepeat 1 1
env-map material.envMap None
fog material.fog true
height geometry.height 1
metalness material.metalness 0
normal-map material.normalMap None
normal-scale material.normalScale 1 1
normal-texture-offset material.normalTextureOffset 0 0
normal-texture-repeat material.normalTextureRepeat 1 1
repeat material.repeat 1 1
roughness material.roughness 0.5
segments-depth geometry.segmentsDepth 1
segments-height geometry.segmentsHeight 1
segments-width geometry.segmentsWidth 1
spherical-env-map material.sphericalEnvMap None
src material.src None
width geometry.width 1
wireframe material.wireframe false
wireframe-linewidth material.wireframeLinewidth 2