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

14 lines
332 B
JavaScript

import { PolyhedronBufferGeometry } from 'three';
import Geometry from './Geometry.js';
export default {
extends: Geometry,
props: {
radius: { type: Number, default: 1 },
detail: { type: Number, default: 0 },
},
created() {
this.parent.geometry = new PolyhedronBufferGeometry(this.radius, this.detail);
},
};