Sfoglia il codice sorgente

docs: added octahedron

astanusic 2 anni fa
parent
commit
e879ebde33

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

@@ -91,6 +91,7 @@ export default defineConfig({
               { text: 'Circle', link: '/cientos/shapes/circle' },
               { text: 'Cone', link: '/cientos/shapes/cone' },
               { text: 'Icosahedron', link: '/cientos/shapes/icosahedron' },
+              { text: 'Octahedron', link: '/cientos/shapes/octahedron' },
               { text: 'Plane', link: '/cientos/shapes/plane' },
               { text: 'Ring', link: '/cientos/shapes/ring' },
               { text: 'Sphere', link: '/cientos/shapes/sphere' },

+ 16 - 0
docs/cientos/shapes/octahedron.md

@@ -0,0 +1,16 @@
+# Octahedron
+
+![](/cientos/octahedron.png)
+
+The `cientos` package provides a `<Octahedron />` component that serves as a short-cut for a `OctahedronGeometry` and a `MeshBasicMaterial` with a `Mesh` object.
+
+## Usage
+
+```html
+<Octahedron :args="[1, 0]" color="red" />
+
+// Octahedron with a custom material transformations
+<Octahedron ref="icosahedronRef" :args="[1, 0]" :position="[2, 4, 0]">
+  <TresMeshToonMaterial color="red" />
+</Octahedron>
+```

BIN
docs/public/cientos/octahedron.png