2021-04-16 10:13:00 +08:00
|
|
|
import { geometryComponent } from './Geometry.js'
|
|
|
|
import { RingGeometry } from 'three'
|
2020-09-28 21:36:22 +08:00
|
|
|
|
2021-03-16 03:39:24 +08:00
|
|
|
export const props = {
|
|
|
|
innerRadius: { type: Number, default: 0.5 },
|
|
|
|
outerRadius: { type: Number, default: 1 },
|
|
|
|
thetaSegments: { type: Number, default: 8 },
|
|
|
|
phiSegments: { type: Number, default: 1 },
|
|
|
|
thetaStart: { type: Number, default: 0 },
|
|
|
|
thetaLength: { type: Number, default: Math.PI * 2 },
|
2021-04-16 10:13:00 +08:00
|
|
|
}
|
2021-03-16 03:39:24 +08:00
|
|
|
|
2021-04-16 10:13:00 +08:00
|
|
|
export function createGeometry(comp: any): RingGeometry {
|
|
|
|
return new RingGeometry(comp.innerRadius, comp.outerRadius, comp.thetaSegments, comp.phiSegments, comp.thetaStart, comp.thetaLength)
|
|
|
|
}
|
2021-03-16 03:39:24 +08:00
|
|
|
|
2021-04-16 10:13:00 +08:00
|
|
|
export default geometryComponent('RingGeometry', props, createGeometry)
|