2018-12-17 19:22:38 +08:00

18 lines
479 B
JavaScript

/**
* 平面
* @param {*} geometry 几何体
* @param {*} material 材质
*/
function Plane(geometry = new THREE.PlaneBufferGeometry(50, 50), material = new THREE.MeshStandardMaterial()) {
THREE.Mesh.call(this, geometry, material);
this.name = '平面';
this.rotation.x = -Math.PI / 2;
this.castShadow = true;
this.receiveShadow = true;
}
Plane.prototype = Object.create(THREE.Mesh.prototype);
Plane.prototype.constructor = Plane;
export default Plane;