| | |
| | | |
| | | initScene = () => { |
| | | const scene = new THREE.Scene(); |
| | | // scene.background = new THREE.Color(0xf0f0f0); |
| | | // scene.background = new THREE.Color(0x333333); |
| | | |
| | | // scene.background = new THREE.Color(0xf8f8f8); |
| | | scene.background = new THREE.Color(0x7a7a7a); |
| | | scene.fog = new THREE.Fog(scene.background, 1, 5000); |
| | |
| | | } |
| | | } |
| | | |
| | | rePerspective = (maxHeight) => { |
| | | this.camera.position.set(-maxHeight * 0.8, maxHeight * 0.8, maxHeight * 0.8); |
| | | this.controls.target = new THREE.Vector3(0, maxHeight * 0.55, 0); |
| | | } |
| | | |
| | | destroy = () => { |
| | | cancelAnimationFrame(this.animationFrame); |
| | | window.removeEventListener('resize', this.resizeHandler); |