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

TorusKnot ^1.6.0

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

typescript
args: [
  radius: number,
  tube: number,
  tubularSegments: number,
  radialSegments: number,
  p: number,
  q: number
]

Reference: TorusKnotGeometry

Usage

html
<TorusKnot :args="[0.6, 0.2, 64, 8]" color="lime" />

// TorusKnot with a custom material transformations
<TorusKnot ref="torusKnotRef" :args="[0.6, 0.2, 64, 8]" :position="[-2, 6, 2]">
  <TresMeshToonMaterial color="lime" />
</TorusKnot>