mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
add plane mesh
This commit is contained in:
parent
924d5092a2
commit
207fbc3f70
@ -1,7 +1,4 @@
|
||||
import {
|
||||
BoxBufferGeometry,
|
||||
} from 'three';
|
||||
|
||||
import { BoxBufferGeometry } from 'three';
|
||||
import Mesh from './Mesh.js';
|
||||
|
||||
export default {
|
||||
|
27
src/meshes/Plane.js
Normal file
27
src/meshes/Plane.js
Normal file
@ -0,0 +1,27 @@
|
||||
import { PlaneBufferGeometry } from 'three';
|
||||
import Mesh from './Mesh.js';
|
||||
|
||||
export default {
|
||||
extends: Mesh,
|
||||
props: {
|
||||
width: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
height: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
widthSegments: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
heightSegments: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.geometry = new PlaneBufferGeometry(this.width, this.height, this.widthSegments, this.heightSegments);
|
||||
},
|
||||
};
|
@ -1,7 +1,4 @@
|
||||
import {
|
||||
SphereBufferGeometry,
|
||||
} from 'three';
|
||||
|
||||
import { SphereBufferGeometry } from 'three';
|
||||
import Mesh from './Mesh.js';
|
||||
|
||||
export default {
|
||||
|
Loading…
Reference in New Issue
Block a user