<a-cube>
Note: This documentation is for the old 0.1.0 version of A-Frame. Check out the documentation for the current 1.5.0 version
The cube primitive wraps an entity that contains geometry
and material
components.
Attribute | Default Value | Component Mapping |
---|---|---|
color | gray | material.color |
depth | 1.5 | geometry.depth |
height | 1.5 | geometry.height |
metalness | 0 | material.metalness |
opacity | 1 | material.opacity |
roughness | 0.5 | material.roughness |
shader | standard | material.shader |
transparent | true | material.transparent |
translate | 0 0 0 | geometry.translate |
src | None | material.src |
width | 1.5 | geometry.width |
Examples
A default gray cube:
<a-cube></a-cube> |
A flattened textured cube:
<a-cube rotation="0 45 0" width="8" depth="8" height="1" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Trefoil_knot_left.svg/2000px-Trefoil_knot_left.svg.png" opacity="0.5"> |