Cylinder #

Cylinder constructs a cylinder-type 3D primitive in your scene.

It can be sized through dimHeight, radiusTop, and radiusBottom properties, which take numeric values measured in meters. You can also specify the number of segments in the cylinder with the segments property.

// Round cylinder <Cylinder radiusTop={0.5} radiusBottom={0.5} dimHeight={2} segments={12} /> // Cone <Cylinder radiusTop={0} radiusBottom={1} dimHeight={2} segments={12} />

Like all 3D primitives, Cylinder also supports the lit, texture, and wireframe props. If lit is true, the Cylinder's materials are affected by scene lighting. If wireframe is true, the Cylinder will render in a wireframe style. If texture is specified, React VR will look up the corresponding image and use it to texture the Cylinder. This can be a string, an asset() call, or a require().

Props #

dimHeight?: PropTypes.number #

Height of the cylinder in meters

lit?: PropTypes.bool #

The lit property specifies if the Model will be affected by lights placed in the scene.

materialParameters?: PropTypes.object #

set material parameters in three.js

radiusBottom?: PropTypes.number #

Radius of the cylinder bottom in meters

radiusTop?: PropTypes.number #

Radius of the cylinder top in meters

segments?: PropTypes.number #

Number of segments around the cylinder higher numbers corresponds to a smoother cylinder

style?: style #

color color
opacity PropTypes.number

texture?: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object]) #

texture is a string specifying the url of the texture to be used for the Model, this will be an http address

wireframe?: PropTypes.bool #

Specifying true for this property will cause the object to be displayed as a wireframe

You can file an issue on GitHub if you see a typo or error on this page!