瀏覽代碼

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. 二進制
      docs/public/cientos/box.png

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

@@ -86,7 +86,10 @@ export default defineConfig({
           },
           {
             text: 'Shapes',
-            items: [{ text: 'Plane', link: '/cientos/shapes/plane' }],
+            items: [
+              { text: 'Plane', link: '/cientos/shapes/plane' },
+              { text: 'Box', link: '/cientos/shapes/box' },
+            ],
           },
           {
             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>
+```
+

二進制
docs/public/cientos/box.png