1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-25 04:42:01 +08:00
trois/src/geometries/PolyhedronGeometry.js

16 lines
402 B
JavaScript
Raw Normal View History

2020-09-28 21:36:22 +08:00
import { PolyhedronBufferGeometry } from 'three';
import Geometry from './Geometry.js';
export default {
extends: Geometry,
props: {
2020-09-28 22:56:10 +08:00
vertices: Array,
indices: Array,
2020-09-28 21:36:22 +08:00
radius: { type: Number, default: 1 },
detail: { type: Number, default: 0 },
},
created() {
2020-09-28 22:56:10 +08:00
this.parent.geometry = new PolyhedronBufferGeometry(this.vertices, this.indices, this.radius, this.detail);
2020-09-28 21:36:22 +08:00
},
};