<a-cylinder>

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

The cylinder primitive is an entity that prescribes the geometry with its geometric primitive set to cylinder. It can be used to create tubes and curved surfaces.

Examples

The cylinder primitive is versatile and can actually be used to create various shapes:

<!-- Basic cylinder. -->
<a-cylinder color="crimson" height="3" radius="1.5"></a-cylinder>
<!-- Hexagon. -->
<a-cylinder color="cyan" segments-radial="8"></a-cylinder>
<!-- Pac-man. -->
<a-cylinder color="yellow" theta-start="50" theta-length="280" side="double"></a-cylinder>
<!-- Green pipe. -->
<a-cylinder color="green" open-ended="true"></a-cylinder>

Attributes

Note that the cylinder primitive inherits common mesh attributes.

AttributeComponent MappingDefault Value
heightgeometry.height1.5
open-endedgeometry.openEndedfalse
radiusgeometry.radius0.75
segments-heightgeometry.segmentsHeight1
segments-radialgeometry.segmentsRadial36
theta-lengthgeometry.thetaLength360
theta-startgeometry.thetaStart0