| | |
| | | // this.camera.position.z = 600; |
| | | // //相机的朝向 |
| | | // this.camera.lookAt(0, 0, 0); |
| | | this.camera.position.set( - 350, 1070, 1550 ); |
| | | this.camera.position.set( -350, 650, 1100 ); |
| | | this.camera.lookAt( this.scene.position ); |
| | | //将相机放到场景中 |
| | | this.scene.add(this.camera); |
| | | } else { |
| | | this.camera.position.set( - 350, 1070, 1550 ); |
| | | this.camera.position.set( -350, 650, 1100 ); |
| | | this.camera.lookAt( this.scene.position ); |
| | | } |
| | | } |
| | |
| | | this.controls.getObject().position.z = 200; |
| | | this.controls.lock(); |
| | | } |
| | | this.mainView = function () { |
| | | this.camera.position.set( 1400, 400, 2000 ); |
| | | this.camera.lookAt( 1400, 500, 0 ); |
| | | } |
| | | this.leftView = function () { |
| | | this.camera.position.set( -3000, 300, -2000 ); |
| | | this.camera.lookAt(0, 500, -2000); |
| | | } |
| | | this.verticalView = function () { |
| | | this.camera.position.set( 1400, 6000, -1800 ); |
| | | this.camera.lookAt( 1400, 0, -1800 ); |
| | | } |
| | | this.backlView = function () { |
| | | this.initCamera(); |
| | | } |
| | | }, |
| | | |
| | | }; |