From 16e913b4df04cd6e49df5d4128066328800b0442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=93=B6=E4=B8=AD=E6=B2=99?= <464652163@qq.com> Date: Tue, 9 Jan 2024 18:08:47 +0800 Subject: [PATCH] 123 --- src/views/bim/bimHome/components/ThreeView2.vue | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/views/bim/bimHome/components/ThreeView2.vue b/src/views/bim/bimHome/components/ThreeView2.vue index 63e8cb3..b0d2c0e 100644 --- a/src/views/bim/bimHome/components/ThreeView2.vue +++ b/src/views/bim/bimHome/components/ThreeView2.vue @@ -686,13 +686,16 @@ const check = () => { if (checkindex == romeObj.length) { // 巡检结束 checkComplete(); } - setTimeout(() => { - check() - }, 1000) + check() } }); - // 显示标签,已经检查通过 - addLabel(checkArr[checkindex], checkArr[checkindex].isPass); + var pos1 = new THREE.Vector3( camera.position ); + + var pos2 = new THREE.Vector3( checkPosition ); + + var distance = pos1.distanceTo(pos2); + console.log(12354, distance); + let nextObj; if (checkindex == checkArr.length - 1) { nextObj = checkArr[0].getWorldPosition(new THREE.Vector3()) @@ -707,6 +710,8 @@ const check = () => { ease: "power1.inOut", onComplete: () => { + // 显示标签,已经检查通过 + // addLabel(checkArr[checkindex], checkArr[checkindex].isPass); }, }); checkindex++; @@ -716,8 +721,10 @@ const check = () => { // 巡检结束 const checkComplete = () => { toHomeView(); + checkindex = 0; bimStore().setCheckArr(romeObj); emit('checkComplete', romeObj); + return; }