mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 12:22:03 +08:00
14 lines
407 B
TypeScript
14 lines
407 B
TypeScript
|
import { geometryComponent } from './Geometry.js'
|
||
|
import { TetrahedronGeometry } from 'three'
|
||
|
|
||
|
export const props = {
|
||
|
radius: { type: Number, default: 1 },
|
||
|
detail: { type: Number, default: 0 },
|
||
|
}
|
||
|
|
||
|
export function createGeometry(comp: any): TetrahedronGeometry {
|
||
|
return new TetrahedronGeometry(comp.radius, comp.detail)
|
||
|
}
|
||
|
|
||
|
export default geometryComponent('TetrahedronGeometry', props, createGeometry)
|