diff --git a/src/views/oneMap/BIM/WangJiaPIng.vue b/src/views/oneMap/BIM/WangJiaPIng.vue index 171d8d6..e7b1d51 100644 --- a/src/views/oneMap/BIM/WangJiaPIng.vue +++ b/src/views/oneMap/BIM/WangJiaPIng.vue @@ -401,8 +401,6 @@ Controls.value.maxPolarAngle = 1.5; // //上下翻转的最小角度 Controls.value.minPolarAngle = 0.2; - //是否允许缩放 - Controls.value.enableZoom = false; // 使动画循环使用时阻尼或自转 意思是否有惯性 Controls.value.enableDamping = false; // 动态阻尼系数 就是鼠标拖拽旋转灵敏度 @@ -412,7 +410,7 @@ // 是否可以缩放与速度 Controls.value.enableZoom = true; // 设置相机距离原点的最远距离 - Controls.value.minDistance = 50; + Controls.value.minDistance = 30; // 设置相机距离原点的最远距离 Controls.value.maxDistance = 3000; // 是否开启右键拖拽 @@ -479,8 +477,8 @@ Renderer.value.render(Scene, Camera.value); LabelRenderer.value.render(Scene, Camera.value); const delta = clock.getDelta(); - // console.log(Camera.value); - // console.log(Controls.value); + console.log(Camera.value); + console.log(Controls.value); }; // 创建气泡窗 @@ -535,11 +533,33 @@ duration: 3, ease: "power4.out", }); - // 打开弹窗 - labelData.value.forEach((element) => { - if (element.name == "静力水准仪") element.show = true; + } else if (data.name[0] == "应变计") { + // 摄像机位置 + gsap.to(Camera.value.position, { + x: -18.741902596516276, + y: 11.41010130909887, + z: 8.418282711965766, + duration: 3, + ease: "power4.out", + }); + // 视角 + gsap.to(Controls.value.target, { + x: 8.466340266349222, + y: 7.3984913282701665, + z: -5.438067100513153, + duration: 3, + ease: "power4.out", }); } + + // 打开弹窗 + labelData.value.forEach((element) => { + if (element.name == data.name[0]) { + element.show = true; + } else { + element.show = false; + } + }); }; // const BIMClick = () => { // console.log("触发点击事件,隐藏弹窗");