瀏覽代碼

docs: added sphere

astanusic 2 年之前
父節點
當前提交
6ce9d6d3d4
共有 3 個文件被更改,包括 20 次插入1 次删除
  1. 2 1
      docs/.vitepress/config.ts
  2. 18 0
      docs/cientos/shapes/sphere.md
  3. 二進制
      docs/public/cientos/sphere.png

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

@@ -87,8 +87,9 @@ export default defineConfig({
           {
             text: 'Shapes',
             items: [
-              { text: 'Plane', link: '/cientos/shapes/plane' },
               { text: 'Box', link: '/cientos/shapes/box' },
+              { text: 'Plane', link: '/cientos/shapes/plane' },
+              { text: 'Sphere', link: '/cientos/shapes/sphere' },
             ],
           },
           {

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

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

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