<a-cylinder>

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 cylinder primitive makes it easy to add tubes and curved surfaces to a scene. It wraps an entity that contains geometry and material components.

Attribute Default Value Component Mapping
color gray material.color
height 1.5 geometry.height
metalness 0.0 material.metalness
opacity 1.0 material.opacity
open-ended false geometry.openEnded
radius 0.75 geometry.radius
radius-bottom 0.75 geometry.radiusBottom
radius-top 0.75 geometry.radiusTop
roughness 0.5 material.roughness
segments-height 1 geometry.segmentsHeight
segments-radial 36 geometry.segmentsRadial
shader standard material.shader
side front material.side
src None material.src
theta-length 360 geometry.thetaLength
theta-start 0 geometry.thetaStart
transparent true material.transparent

View source on GitHub

Examples

Default gray cylinder with end-caps:

<a-cylinder></a-cylinder>

Various shapes using cylinders:

<!-- A red hexagon -->
<a-cylinder position="-4 0 -3" rotation="90 -90 20" radius="2" segments-radial="8" color="red"></a-cylinder>

<!-- Pacman -->
<a-cylinder position="0 0 -3" rotation="65 45 0" radius="1" height="1" theta-start="57" theta-length="286" side="double" color="yellow"></a-cylinder>

<!-- A green pipe -->
<a-cylinder position="4 0 -3" rotation="-80 15 -20" height="5" open-ended="true" color="green"></a-cylinder>