Browse Source

docs: added torus knot

astanusic 2 years ago
parent
commit
89dbdd6054
3 changed files with 19 additions and 0 deletions
  1. 1 0
      docs/.vitepress/config.ts
  2. 18 0
      docs/cientos/shapes/torus-knot.md
  3. BIN
      docs/public/cientos/torus-knot.png

+ 1 - 0
docs/.vitepress/config.ts

@@ -91,6 +91,7 @@ export default defineConfig({
               { text: 'Plane', link: '/cientos/shapes/plane' },
               { text: 'Sphere', link: '/cientos/shapes/sphere' },
               { text: 'Torus', link: '/cientos/shapes/torus' },
+              { text: 'TorusKnot', link: '/cientos/shapes/torus-knot' },
             ],
           },
           {

+ 18 - 0
docs/cientos/shapes/torus-knot.md

@@ -0,0 +1,18 @@
+# TorusKnot
+
+![](/cientos/torus-knot.png)
+
+The `cientos` package provides a `<TorusKnot />` component that serves as a short-cut for a `TorusKnotGeometry` and a `MeshBasicMaterial` with a `Mesh` object.
+
+## 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>
+```
+
+

BIN
docs/public/cientos/torus-knot.png