1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00
trois/src/geometries/TetrahedronGeometry.ts

14 lines
413 B
TypeScript
Raw Normal View History

2021-04-19 04:25:24 +08:00
import { geometryComponent } from './Geometry'
2021-04-16 10:13:00 +08:00
import { TetrahedronGeometry } from 'three'
export const props = {
radius: { type: Number, default: 1 },
detail: { type: Number, default: 0 },
2021-04-27 00:36:37 +08:00
} as const
2021-04-16 10:13:00 +08:00
export function createGeometry(comp: any): TetrahedronGeometry {
return new TetrahedronGeometry(comp.radius, comp.detail)
}
export default geometryComponent('TetrahedronGeometry', props, createGeometry)