mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
18 lines
479 B
JavaScript
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; |