1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 20:32:02 +08:00
trois/src/geometries/DodecahedronGeometry.ts
2021-04-18 22:25:24 +02:00

14 lines
408 B
TypeScript

import { geometryComponent } from './Geometry'
import { DodecahedronGeometry } from 'three'
export const props = {
radius: { type: Number, default: 1 },
detail: { type: Number, default: 0 },
}
export function createGeometry(comp: any): DodecahedronGeometry {
return new DodecahedronGeometry(comp.radius, comp.detail)
}
export default geometryComponent('DodecahedronGeometry', props, createGeometry)