Sphere #

Sphere constructs a sphere-type 3D primitive in your scene.

It can be sized through a radius property, which takes numeric values measured in meters. You can also specify the number of width and height segments with the widthSegments and heightSegments props.

<Sphere radius={0.5} widthSegments={20} heightSegments={12} />

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

Props #

heightSegments?: PropTypes.number #

The number of segments between the poles of the sphere, large corresponds to a smoother sphere but will be slower to render

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

radius?: PropTypes.number #

The radius in meters of the sphere

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 sphere, this will be an http address the image is wrap around the sphere

widthSegments?: PropTypes.number #

The number of segments around the sphere, large corresponds to a smoother sphere but will be slower to render

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!