Browse Source

docs: added sphere

astanusic 2 năm trước cách đây
mục cha
commit
6ce9d6d3d4
3 tập tin đã thay đổi với 20 bổ sung1 xóa
  1. 2 1
      docs/.vitepress/config.ts
  2. 18 0
      docs/cientos/shapes/sphere.md
  3. BIN
      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>
+```
+
+

BIN
docs/public/cientos/sphere.png