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

16 lines
503 B
JavaScript
Raw Normal View History

2021-04-04 05:12:38 +08:00
import { geometryComponent } from './Geometry.js';
2021-03-16 05:20:30 +08:00
import { PlaneGeometry } from 'three';
export const props = {
width: { type: Number, default: 1 },
height: { type: Number, default: 1 },
widthSegments: { type: Number, default: 1 },
heightSegments: { type: Number, default: 1 },
};
export function createGeometry(comp) {
return new PlaneGeometry(comp.width, comp.height, comp.widthSegments, comp.heightSegments);
};
2021-04-04 05:12:38 +08:00
export default geometryComponent('PlaneGeometry', props, createGeometry);