|
@@ -6,7 +6,7 @@ import Viewport from '../viewer/Viewport.js'
|
|
|
import {ExtendView} from "../../viewer/ExtendView.js";
|
|
|
const texLoader = new THREE.TextureLoader()
|
|
|
const circleGeo = new THREE.CircleGeometry(1.45,100);
|
|
|
-const sphereGeo = new THREE.SphereBufferGeometry(0.018,10,10);
|
|
|
+const sphereGeo = new THREE.SphereBufferGeometry(0.015,8,8);
|
|
|
|
|
|
|
|
|
const magDisMin = 1;//相机离目标位置的距离的分界线,当离得远时要缩小fov以使看到的视野固定(望远镜效果)
|
|
@@ -124,12 +124,12 @@ export default class Magnifier extends THREE.Object3D {//放大镜or望远镜
|
|
|
this.targetPoint.add(new THREE.Mesh(sphereGeo, new THREE.MeshBasicMaterial({
|
|
|
color:"#ff0000",
|
|
|
transparent:true,
|
|
|
- opacity:0.5,
|
|
|
+ opacity:0.6,
|
|
|
})))
|
|
|
this.targetPoint.add(new THREE.Mesh(sphereGeo, new THREE.MeshBasicMaterial({
|
|
|
color:"#ff0000",
|
|
|
transparent:true,
|
|
|
- opacity:0.2,
|
|
|
+ opacity:0.4,
|
|
|
depthTest:false //被遮挡层
|
|
|
})))
|
|
|
|
|
@@ -283,7 +283,7 @@ export default class Magnifier extends THREE.Object3D {//放大镜or望远镜
|
|
|
|
|
|
//this.position.copy(playerPos.clone().add(dir))
|
|
|
}
|
|
|
- let s = finalDisToAim
|
|
|
+ let s = finalDisToAim * this.camera.fov / 30
|
|
|
this.quaternion.copy(playerCamera.quaternion);
|
|
|
this.targetPoint.position.copy(aimPos);
|
|
|
this.targetPoint.scale.set(s,s,s)
|