|
@@ -7,7 +7,8 @@ import libTransform from 'coordtransform';
|
|
|
|
|
|
|
|
|
|
let aniPathStartTime, recordStarted, aniPaths = [], pathDevices = [], pathHistorys = new Map, pathModels = [], modelList = {},
|
|
let aniPathStartTime, recordStarted, aniPaths = [], pathDevices = [], pathHistorys = new Map, pathModels = [], modelList = {},
|
|
- camFollowDevice, modelDisToCam, maxDevicePathId=0
|
|
|
|
|
|
+ camFollowDevice, modelDisToCam, maxDevicePathId=0, hisPathDisplay, livePathDisplay
|
|
|
|
+
|
|
let createAnimatePath = (token)=>{//实时路径 保存:generateAniPathData
|
|
let createAnimatePath = (token)=>{//实时路径 保存:generateAniPathData
|
|
let caseId = Potree.browser.urlHasValue('caseId',true)
|
|
let caseId = Potree.browser.urlHasValue('caseId',true)
|
|
let count = 0
|
|
let count = 0
|
|
@@ -59,6 +60,7 @@ let createAnimatePath = (token)=>{//实时路径 保存:generateAniPathData
|
|
path.isAnimate = true //标记
|
|
path.isAnimate = true //标记
|
|
viewer.scene.addMeasurement(path);
|
|
viewer.scene.addMeasurement(path);
|
|
viewer.scene.overlayScene.add(path);
|
|
viewer.scene.overlayScene.add(path);
|
|
|
|
+
|
|
aniPaths.push(path)
|
|
aniPaths.push(path)
|
|
|
|
|
|
pathModels.push({})
|
|
pathModels.push({})
|
|
@@ -154,7 +156,7 @@ let createAnimatePath = (token)=>{//实时路径 保存:generateAniPathData
|
|
//console.log('positions', list )
|
|
//console.log('positions', list )
|
|
|
|
|
|
|
|
|
|
- /* count++ < 2 && */ setTimeout(addPath, 1000)
|
|
|
|
|
|
+ setTimeout(addPath, 1000)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -211,7 +213,7 @@ let createAnimatePath = (token)=>{//实时路径 保存:generateAniPathData
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- addPath()
|
|
|
|
|
|
+
|
|
|
|
|
|
let transitionRatio = 0.1
|
|
let transitionRatio = 0.1
|
|
viewer.addEventListener("update", ()=>{
|
|
viewer.addEventListener("update", ()=>{
|
|
@@ -246,6 +248,11 @@ let createAnimatePath = (token)=>{//实时路径 保存:generateAniPathData
|
|
});
|
|
});
|
|
|
|
|
|
}catch(e){console.error(e)}
|
|
}catch(e){console.error(e)}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ addPath()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -2684,7 +2691,22 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
|
|
modelDisToCam = 4 //拉进
|
|
modelDisToCam = 4 //拉进
|
|
},
|
|
},
|
|
|
|
|
|
-
|
|
|
|
|
|
+ setLivePathDisplay(show){//在实时路径面板
|
|
|
|
+ console.log('setLivePathDisplay',show)
|
|
|
|
+ livePathDisplay = show
|
|
|
|
+ viewer.scene.measurements.forEach(e=>{
|
|
|
|
+ let show_ = e.isAnimate && show
|
|
|
|
+ Potree.Utils.updateVisible(e,'live-display',show_)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ setHisPathDisplay(show){//在历史路径面板
|
|
|
|
+ console.log('setHisPathDisplay',show)
|
|
|
|
+ hisPathDisplay = show
|
|
|
|
+ viewer.scene.measurements.forEach(e=>{
|
|
|
|
+ let show_ = !e.isAnimate && show
|
|
|
|
+ Potree.Utils.updateVisible(e,'live-display',show_)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
startRecordPath(){//开始录制
|
|
startRecordPath(){//开始录制
|
|
console.log('startRecordPath')
|
|
console.log('startRecordPath')
|
|
recordStarted = true
|
|
recordStarted = true
|