ソースを参照

docs: added box

astanusic 2 年 前
コミット
809ef771a8
3 ファイル変更21 行追加1 行削除
  1. 4 1
      docs/.vitepress/config.ts
  2. 17 0
      docs/cientos/shapes/box.md
  3. BIN
      docs/public/cientos/box.png

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

@@ -86,7 +86,10 @@ export default defineConfig({
           },
           },
           {
           {
             text: 'Shapes',
             text: 'Shapes',
-            items: [{ text: 'Plane', link: '/cientos/shapes/plane' }],
+            items: [
+              { text: 'Plane', link: '/cientos/shapes/plane' },
+              { text: 'Box', link: '/cientos/shapes/box' },
+            ],
           },
           },
           {
           {
             text: 'Misc',
             text: 'Misc',

+ 17 - 0
docs/cientos/shapes/box.md

@@ -0,0 +1,17 @@
+# Box
+
+![](/cientos/box.png)
+
+The `cientos` package provides a `<Box />` component that serves as a short-cut for a `BoxGeometry` and a `MeshBasicMaterial` with a `Mesh` object.
+
+## Usage
+
+```html
+<Box :args="[1, 1, 1]" color="orange" />
+
+// Plane with a custom material transformations
+<Box ref="planeRef" :args="[1, 1, 1]" :position="[0, 4, 0]">
+  <TresMeshToonMaterial color="orange" />
+</Box>
+```
+

BIN
docs/public/cientos/box.png