123
							parent
							
								
									aa332f38c6
								
							
						
					
					
						commit
						3b8d73a47b
					
				| 
						 | 
					@ -685,24 +685,21 @@ const check = () => {
 | 
				
			||||||
            duration: 10,
 | 
					            duration: 10,
 | 
				
			||||||
            ease: 'power1.inOut',
 | 
					            ease: 'power1.inOut',
 | 
				
			||||||
            onComplete: () => {
 | 
					            onComplete: () => {
 | 
				
			||||||
                if (checkindex == romeObj.length) { // 巡检结束
 | 
					 | 
				
			||||||
                    checkComplete();
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                check()
 | 
					                check()
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
        var pos1 = new THREE.Vector3( camera.position );
 | 
					        var pos1 = new THREE.Vector3( camera.position );
 | 
				
			||||||
 
 | 
					        console.log(12354, pos1);
 | 
				
			||||||
        var pos2 = new THREE.Vector3( checkPosition );
 | 
					        var pos2 = new THREE.Vector3( checkPosition );
 | 
				
			||||||
        
 | 
					        console.log(54321, pos2);
 | 
				
			||||||
        var distance = pos1.distanceTo(pos2);
 | 
					        var distance = pos1.distanceTo(pos2);
 | 
				
			||||||
        console.log(12354, distance);
 | 
					        console.log(0, distance);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        let nextObj;
 | 
					        let nextObj;
 | 
				
			||||||
        if (checkindex == checkArr.length - 1) {
 | 
					        if (checkindex == checkArr.length - 1) {
 | 
				
			||||||
            nextObj = checkArr[0].getWorldPosition(new THREE.Vector3())
 | 
					            nextObj = checkArr[0].getWorldPosition(new THREE.Vector3())
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        } else if (checkindex < checkArr.length) {
 | 
					        } else if (checkindex < checkArr.length - 1) {
 | 
				
			||||||
            nextObj = checkArr[checkindex + 1].getWorldPosition(new THREE.Vector3())
 | 
					            nextObj = checkArr[checkindex + 1].getWorldPosition(new THREE.Vector3())
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        gsap.to(controls.target, {
 | 
					        gsap.to(controls.target, {
 | 
				
			||||||
| 
						 | 
					@ -710,9 +707,11 @@ const check = () => {
 | 
				
			||||||
            y: nextObj.y + 5.2,
 | 
					            y: nextObj.y + 5.2,
 | 
				
			||||||
            z: nextObj.z,
 | 
					            z: nextObj.z,
 | 
				
			||||||
            duration: 10,
 | 
					            duration: 10,
 | 
				
			||||||
 | 
					 | 
				
			||||||
            ease: "power1.inOut",
 | 
					            ease: "power1.inOut",
 | 
				
			||||||
            onComplete: () => {
 | 
					            onComplete: () => {
 | 
				
			||||||
 | 
					                if (checkindex == romeObj.length) { // 巡检结束
 | 
				
			||||||
 | 
					                    checkComplete();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
                // 显示标签,已经检查通过
 | 
					                // 显示标签,已经检查通过
 | 
				
			||||||
                // addLabel(checkArr[checkindex], checkArr[checkindex].isPass);
 | 
					                // addLabel(checkArr[checkindex], checkArr[checkindex].isPass);
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
| 
						 | 
					@ -724,7 +723,6 @@ const check = () => {
 | 
				
			||||||
// 巡检结束
 | 
					// 巡检结束
 | 
				
			||||||
const checkComplete = () => {
 | 
					const checkComplete = () => {
 | 
				
			||||||
    toHomeView();
 | 
					    toHomeView();
 | 
				
			||||||
    checkindex = 0;
 | 
					 | 
				
			||||||
    bimStore().setCheckArr(romeObj);
 | 
					    bimStore().setCheckArr(romeObj);
 | 
				
			||||||
    emit('checkComplete', romeObj);
 | 
					    emit('checkComplete', romeObj);
 | 
				
			||||||
    return;
 | 
					    return;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue