2021-03-07 06:14:22 +08:00
|
|
|
import { RingGeometry } from 'three';
|
2020-09-28 21:36:22 +08:00
|
|
|
import Geometry from './Geometry.js';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
extends: Geometry,
|
|
|
|
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 },
|
|
|
|
},
|
2020-10-03 17:00:37 +08:00
|
|
|
methods: {
|
|
|
|
createGeometry() {
|
2021-03-07 06:14:22 +08:00
|
|
|
this.geometry = new RingGeometry(this.innerRadius, this.outerRadius, this.thetaSegments, this.phiSegments, this.thetaStart, this.thetaLength);
|
2020-10-03 17:00:37 +08:00
|
|
|
},
|
2020-09-28 21:36:22 +08:00
|
|
|
},
|
|
|
|
};
|