修复点击设备卡墙视角中间
This commit is contained in:
@@ -227,7 +227,6 @@ export default class Demo {
|
||||
this.preHover.material.color.set("white");
|
||||
this.preHover = intersects[0].object;
|
||||
}
|
||||
|
||||
intersects[0].object.material.color.set("red");
|
||||
const tagP = intersects[0].object.getWorldPosition(
|
||||
new this.THREE.Vector3()
|
||||
|
||||
@@ -21,12 +21,12 @@ export function handleLClick(targetPoint) {
|
||||
this.tag3CSS2DObj.translateX(3);
|
||||
this.tag3CSS2DObj.translateZ(10);
|
||||
this.tag3CSS2DObj.translateY(-5);
|
||||
intoAnimation.call(this, 4.31, -2.55, -11);
|
||||
intoAnimation.call(this, 1.31, -2.55, -11);
|
||||
} else if (/tl$/.test(targetPoint.name)) {
|
||||
this.tag3CSS2DObj.translateX(-3);
|
||||
this.tag3CSS2DObj.translateZ(10);
|
||||
this.tag3CSS2DObj.translateY(-5);
|
||||
intoAnimation.call(this, -4.31, -2.55, -11);
|
||||
intoAnimation.call(this, -1.31, -2.55, -11);
|
||||
} else if (/tc$/.test(targetPoint.name)) {
|
||||
this.tag3CSS2DObj.translateX(0);
|
||||
this.tag3CSS2DObj.translateZ(10);
|
||||
@@ -49,6 +49,7 @@ export function handleLClick(targetPoint) {
|
||||
}
|
||||
|
||||
function intoAnimation(x = -10, y = 3, z = -12) {
|
||||
//获取当前附着点的世界坐标
|
||||
const worldP = this.targetPoint.getWorldPosition(new this.THREE.Vector3());
|
||||
const positionOBj = this.camera.position;
|
||||
const start = this.orbitControls.target;
|
||||
|
||||
Reference in New Issue
Block a user