Browse Source

docs: added tube

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

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

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

+ 18 - 0
docs/cientos/shapes/tube.md

@@ -0,0 +1,18 @@
+# Tube
+
+![](/cientos/tube.png)
+
+The `cientos` package provides a `<Tube />` component that serves as a short-cut for a `TubeGeometry` and a `MeshBasicMaterial` with a `Mesh` object.
+
+## Usage
+
+```html
+// TubeGeometry needs a curve path to be construct
+<Tube :args="[tubePath, 20, 0.2, 8, false]" color="lightblue" />
+
+// Tube with a custom material transformations
+<Tube ref="tubeRef" :args="[tubePath, 20, 0.2, 8, false]" :position="[0, 4, 0]">
+  <TresMeshToonMaterial color="lightblue" />
+</Tube>
+```
+

BIN
docs/public/cientos/tube.png