diff --git a/docs/component-list/components.ts b/docs/component-list/components.ts index 0328e5d4..59f4f26c 100644 --- a/docs/component-list/components.ts +++ b/docs/component-list/components.ts @@ -68,6 +68,7 @@ export default [ { text: 'CatmullRomCurve3', link: '/guide/shapes/catmullromcurve3' }, { text: 'Circle', link: '/guide/shapes/circle' }, { text: 'Cone', link: '/guide/shapes/cone' }, + { text: 'Cylinder', link: '/guide/shapes/cylinder' }, { text: 'Dodecahedron', link: '/guide/shapes/dodecahedron' }, { text: 'Icosahedron', link: '/guide/shapes/icosahedron' }, { text: 'Line2', link: '/guide/shapes/line2' }, diff --git a/docs/guide/shapes/cylinder.md b/docs/guide/shapes/cylinder.md new file mode 100644 index 00000000..e3578d67 --- /dev/null +++ b/docs/guide/shapes/cylinder.md @@ -0,0 +1,31 @@ +# Cylinder + +![](/cientos/cylinder.png) + +The `cientos` package provides a `` component that serves as a short-cut for a `CylinderGeometry` and a `MeshBasicMaterial` with a `Mesh` object. + +``` +args: [ + radiusTop: number, + radiusBottom: number, + height: number, + radialSegments: number, + heightSegments: number, + openEnded: boolean, + thetaStart: number, + thetaLength: number +] +``` + +Reference: [CylinderGeometry](https://threejs.org/docs/?q=cylinder#api/en/geometries/CylinderGeometry) + +## Usage + +```vue + + +// Cylinder with a custom material transformations + + + +``` \ No newline at end of file diff --git a/docs/public/cientos/cylinder.png b/docs/public/cientos/cylinder.png new file mode 100644 index 00000000..f3f22820 Binary files /dev/null and b/docs/public/cientos/cylinder.png differ diff --git a/src/core/shapes/Cylinder.vue b/src/core/shapes/Cylinder.vue new file mode 100644 index 00000000..4566ef42 --- /dev/null +++ b/src/core/shapes/Cylinder.vue @@ -0,0 +1,45 @@ + + + diff --git a/src/core/shapes/index.ts b/src/core/shapes/index.ts index c9a9e359..d2dc0e4e 100644 --- a/src/core/shapes/index.ts +++ b/src/core/shapes/index.ts @@ -2,6 +2,7 @@ import Box from './Box.vue' import CatmullRomCurve3 from './CatmullRomCurve3.vue' import Circle from './Circle.vue' import Cone from './Cone.vue' +import Cylinder from './Cylinder.vue' import Dodecahedron from './Dodecahedron.vue' import Icosahedron from './Icosahedron.vue' import Line2 from './Line2.vue' @@ -20,6 +21,7 @@ export { Box, CatmullRomCurve3, Circle, + Cylinder, Cone, Dodecahedron, Icosahedron,