| | |
| | | import {MathUtils} from 'three'; |
| | | import { PerspectiveCamera, CameraHelper } from 'three'; |
| | | import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'; |
| | | |
| | |
| | | this.controls = new OrbitControls(this.instance, this.canvas); |
| | | this.controls.target.set(0, 0, 5); |
| | | this.controls.enableDamping = true; |
| | | this.controls.minDistance = 20; |
| | | this.controls.maxDistance = 80; |
| | | this.controls.maxPolarAngle = MathUtils.degToRad(80); |
| | | // this.controls.maxPolarAngle = (-Math.PI / 2); |
| | | } |
| | | |
| | | resize() { |
| | |
| | | width: 48, |
| | | height: 48, |
| | | texture: rotatingApertureTexture, |
| | | positionList: [0, 0.4, 0.3], |
| | | positionList: [0, 0.4, 0], |
| | | scaleList: [1, 1, 1], |
| | | rotateList: [-Math.PI / 2, 0, 0] |
| | | }; |
| | |
| | | width: 40, |
| | | height: 40, |
| | | texture: rotatingPointTexture, |
| | | positionList: [0, 0.3, 0.3], |
| | | positionList: [0, 0.3, 0], |
| | | scaleList: [1, 1, 1], |
| | | rotateList: [-Math.PI / 2, 0, 0] |
| | | }; |
| | |
| | | } |
| | | this.map.add(province); |
| | | }); |
| | | this.map.position.set(1, 1, 0.15); |
| | | this.map.position.set(1, 1, -2); |
| | | this.map.scale.set(10, 10, 10); |
| | | this.map.rotation.set(THREE.MathUtils.degToRad(-90), 0, THREE.MathUtils.degToRad(20)); |
| | | this.container = new THREE.Object3D(); |