You are reading Tres v1 docs. Head over tresjs.org for V2 docs.
Skip to content
On this page

Sphere ^1.6.0

The cientos package provides a <Sphere /> component that serves as a short-cut for a SphereGeometry and a MeshBasicMaterial with a Mesh object.

typescript
args: [
  radius: number,
  widthSegments: number,
  heightSegments: number,
  phiStart: number,
  phiLength: number,
  thetaStart: number,
  thetaLength: number
]

Reference: SphereGeometry

Usage

html
<Sphere :args="[1, 1, 1]" color="pink" />

// Sphere with a custom material transformations
<Sphere ref="planeRef" :args="[1, 1, 1]" :position="[2, 4, 0]">
  <TresMeshToonMaterial color="pink" />
</Sphere>