瀏覽代碼

docs: added torus knot

astanusic 2 年之前
父節點
當前提交
89dbdd6054
共有 3 個文件被更改,包括 19 次插入0 次删除
  1. 1 0
      docs/.vitepress/config.ts
  2. 18 0
      docs/cientos/shapes/torus-knot.md
  3. 二進制
      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>
+```
+
+

二進制
docs/public/cientos/torus-knot.png