Jelajahi Sumber

docs: added torus

astanusic 2 tahun lalu
induk
melakukan
2f9b09964d

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

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

+ 1 - 1
docs/cientos/shapes/box.md

@@ -9,7 +9,7 @@ The `cientos` package provides a `<Box />` component that serves as a short-cut
 ```html
 <Box :args="[1, 1, 1]" color="orange" />
 
-// Plane with a custom material transformations
+// Box with a custom material transformations
 <Box ref="planeRef" :args="[1, 1, 1]" :position="[0, 4, 0]">
   <TresMeshToonMaterial color="orange" />
 </Box>

+ 1 - 1
docs/cientos/shapes/sphere.md

@@ -9,7 +9,7 @@ The `cientos` package provides a `<Sphere />` component that serves as a short-c
 ```html
 <Sphere :args="[1, 1, 1]" color="pink" />
 
-// Plane with a custom material transformations
+// Sphere with a custom material transformations
 <Sphere ref="planeRef" :args="[1, 1, 1]" :position="[2, 4, 0]">
   <TresMeshToonMaterial color="pink" />
 </Sphere>

+ 19 - 0
docs/cientos/shapes/torus.md

@@ -0,0 +1,19 @@
+# Torus
+
+![](/cientos/torus.png)
+
+The `cientos` package provides a `<Torus />` component that serves as a short-cut for a `TorusGeometry` and a `MeshBasicMaterial` with a `Mesh` object.
+
+## Usage
+
+```html
+<Torus :args="[1, 1, 1]" color="cyan" />
+
+// Torus with a custom material transformations
+<Torus ref="torusRef" :args="[0.75, 0.4, 16, 80]" :position="[-2, 6, 0]">
+  <TresMeshToonMaterial color="cyan" />
+ </Torus>
+
+```
+
+

TEMPAT SAMPAH
docs/public/cientos/torus.png