|
@@ -664,16 +664,21 @@ export class Images360 extends THREE.EventDispatcher{
|
|
//Potree.Log('hope flyToPano: '+toPano.pano.id, toPano.pano.position.toArray() )
|
|
//Potree.Log('hope flyToPano: '+toPano.pano.id, toPano.pano.position.toArray() )
|
|
|
|
|
|
|
|
|
|
- if(this.latestToPano && this.latestToPano != toPano && this.latestToPano.pano != this.currentPano){//还在飞//如果旧的toPano只是旋转镜头,就直接取消旧的
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if(this.latestToPano && this.latestToPano != toPano && (//还在飞
|
|
|
|
+ this.latestToPano.pano != this.currentPano || !this.isAtPano())){//如果旧的toPano只在pano旋转镜头,就直接取消旧的,继续执行
|
|
return done(false)
|
|
return done(false)
|
|
}
|
|
}
|
|
|
|
|
|
- //Potree.Log('flyToPano: '+toPano.pano.id, toPano.pano.position.toArray() /* this.latestToPano && this.latestToPano.pano.id */ )
|
|
|
|
-
|
|
|
|
if(this.currentPano == toPano.pano && this.isAtPano() && !toPano.target && !toPano.quaternion ){
|
|
if(this.currentPano == toPano.pano && this.isAtPano() && !toPano.target && !toPano.quaternion ){
|
|
|
|
+ //已在该pano
|
|
this.dispatchEvent({type:'flyToPano', toPano})
|
|
this.dispatchEvent({type:'flyToPano', toPano})
|
|
return done(true);
|
|
return done(true);
|
|
}
|
|
}
|
|
|
|
+ //Potree.Log('flyToPano: '+toPano.pano.id, toPano.pano.position.toArray() /* this.latestToPano && this.latestToPano.pano.id */ )
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
let target = toPano.target
|
|
let target = toPano.target
|
|
let config = Potree.config.displayMode[Potree.settings.displayMode]
|
|
let config = Potree.config.displayMode[Potree.settings.displayMode]
|
|
@@ -839,7 +844,7 @@ export class Images360 extends THREE.EventDispatcher{
|
|
//console.log('progress_', progress_, 'delta',delta , 'progress', progress/*, 'currentSpeed', currentSpeed, */ )
|
|
//console.log('progress_', progress_, 'delta',delta , 'progress', progress/*, 'currentSpeed', currentSpeed, */ )
|
|
|
|
|
|
if (progress > loadNextProgress && toPano.easeName == 'linearTween' && currentSpeed){// 减速. 如果仅旋转就不停止
|
|
if (progress > loadNextProgress && toPano.easeName == 'linearTween' && currentSpeed){// 减速. 如果仅旋转就不停止
|
|
- //console.log('减速', currentSpeed)
|
|
|
|
|
|
+ //console.log('减速', /* currentSpeed , */progress_ )
|
|
toPano.easeName = 'easeOutSine'
|
|
toPano.easeName = 'easeOutSine'
|
|
let restDis = (1 - progress) * dis
|
|
let restDis = (1 - progress) * dis
|
|
toPano.duration = (Math.PI / 2 * restDis) / currentSpeed // 这样能保证初始速度为currentSpeed
|
|
toPano.duration = (Math.PI / 2 * restDis) / currentSpeed // 这样能保证初始速度为currentSpeed
|
|
@@ -851,8 +856,7 @@ export class Images360 extends THREE.EventDispatcher{
|
|
onUpdate(progress)
|
|
onUpdate(progress)
|
|
},
|
|
},
|
|
|
|
|
|
- callback:()=>{
|
|
|
|
-
|
|
|
|
|
|
+ callback:()=>{
|
|
if(!config.atPano.pointUsePanoTex){
|
|
if(!config.atPano.pointUsePanoTex){
|
|
viewer.scene.pointclouds.forEach(e=>{
|
|
viewer.scene.pointclouds.forEach(e=>{
|
|
e.material.stopProjectedPanos()
|
|
e.material.stopProjectedPanos()
|