1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 12:22:03 +08:00
trois/src/geometries/CircleGeometry.js

18 lines
490 B
JavaScript
Raw Normal View History

2020-09-28 21:36:22 +08:00
import { CircleBufferGeometry } from 'three';
import Geometry from './Geometry.js';
export default {
extends: Geometry,
props: {
radius: { type: Number, default: 1 },
segments: { type: Number, default: 8 },
thetaStart: { type: Number, default: 0 },
thetaLength: { type: Number, default: Math.PI * 2 },
},
2020-10-03 17:00:37 +08:00
methods: {
createGeometry() {
this.geometry = new CircleBufferGeometry(this.radius, this.segments, this.thetaStart, this.thetaLength);
},
2020-09-28 21:36:22 +08:00
},
};