Mesh Attributes

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

Many of the primitives are entities that compose a geometric mesh, meaning they primarily prescribe the geometry and material components. Most of the mesh primitives share common attributes, especially for mapping to the material component. These common attributes won’t be described in individual documentation pages for each primitive so they will be listed here.

Example

<a-box>, <a-cylinder>, <a-sphere> are some primitives that prescribe a geometric mesh. They share common attributes relating to the material component:

<a-box opacity="0.5" shader="flat" src="dirt.png"></a-box>
<a-cylinder opacity="0.75" shader="flat" src="soda.png"></a-cylinder>
<a-sphere opacity="1.0" shader="standard" src="sun.png"></a-sphere>

Attributes

AttributeComponent MappingDefault Value
colormaterial.colorgray
metalnessmaterial.metalness0
opacitymaterial.opacity1
roughnessmaterial.roughness0.5
shadermaterial.shaderstandard
srcmaterial.srcNone
translategeometry.translate0 0 0
transparentmaterial.transparenttrue