|
@@ -32,7 +32,7 @@ export default class ConvertViews extends THREE.EventDispatcher{
|
|
|
|
|
|
//this.syncPosRot(sourceFakeApp.viewInfo, targetApp , convertInfo) //修改好位置朝向 这个4dkk的会报错但上一版是用这句
|
|
|
if(sourceApp.sceneType == 'kankan' || sourceFakeApp.viewInfo.isAtPano){
|
|
|
- this.flyToPano(targetApp, sourceFakeApp.viewInfo.currentPano,{duration:0, zoomLevel:sourceFakeApp.viewInfo.zoomLevel})
|
|
|
+ this.flyToPano(targetApp, sourceFakeApp.viewInfo.currentPano?.id, null, {duration:0, zoomLevel:sourceFakeApp.viewInfo.zoomLevel})
|
|
|
}
|
|
|
this.syncView(sourceApp, targetApp, convertInfo)//这个不记得有什么bug了
|
|
|
|
|
@@ -261,7 +261,7 @@ export default class ConvertViews extends THREE.EventDispatcher{
|
|
|
prop.lookAtPoint = new THREE.Vector3().addVectors(panos2[0].position, dir)
|
|
|
|
|
|
}
|
|
|
- this.flyToPano(targetApp, panos2[0].id, prop)
|
|
|
+ this.flyToPano(targetApp, panos2[0].id, null, prop)
|
|
|
|
|
|
|
|
|
}
|
|
@@ -978,12 +978,16 @@ export default class ConvertViews extends THREE.EventDispatcher{
|
|
|
|
|
|
}
|
|
|
|
|
|
- flyToPano(app, panoId, o={}){
|
|
|
+ flyToPano(app, panoId, position, o={}){
|
|
|
if(app.sceneType == 'laser'){
|
|
|
this.laserCancelFly(app)//app.viewer.images360.cancelFlyToPano()
|
|
|
- app.viewer.images360.flyToPano(Object.assign({},{
|
|
|
- pano: app.viewer.images360.getPano(panoId)
|
|
|
- },o))
|
|
|
+ if(app.viewer.images360.panos.length == 0){//slam
|
|
|
+ app.viewer.mainViewport.view.setView({position, duration:1000})
|
|
|
+ }else{
|
|
|
+ app.viewer.images360.flyToPano(Object.assign({},{
|
|
|
+ pano: app.viewer.images360.getPano(panoId)
|
|
|
+ },o))
|
|
|
+ }
|
|
|
}else{
|
|
|
let player = app.app.core.get('Player')
|
|
|
player.flyToPano(Object.assign({},{
|