浏览代码

导览列表能直接飞过去,不按路线过去?

xzw 4 年之前
父节点
当前提交
189bdeb974
共有 1 个文件被更改,包括 14 次插入4 次删除
  1. 14 4
      web/public/static/js/main_2020_show.js

+ 14 - 4
web/public/static/js/main_2020_show.js

@@ -4899,7 +4899,7 @@ window.Modernizr = function(n, e, t) {
             n.prototype.goToDestination = function(e, t, i, n) {
                         
                 //音频 
-                if(this.destinationItem[1] == 0 && e!='noMusic'){//如果是每个folder的起始
+                if(this.destinationItem[1] == 0 && e!='goToHighlight'){//如果是每个folder的起始
                     var musicInfo = this.model.heroLocations[this.destinationItem[0]].musicInfo
                     if(musicInfo && musicInfo.music){
                         var o = musicInfo.music.includes(g_Prefix.slice(-10)) ? musicInfo.music :  g_Prefix + musicInfo.music;
@@ -4925,7 +4925,14 @@ window.Modernizr = function(n, e, t) {
                         //var walk = window.MP_PREFETCHED_MODELDATA.black ? 'black' : 'walk';
                      
                         var s = this.getMomentTour(this.destinationItem)   //window.MP_PREFETCHED_MODELDATA.momentTour || "walk";
-                        a = this.player.warpToPanoByHeroIndex.bind(this.player, this.destinationItem, v.Show, m.Slow,  s, true, i, this.actionComplete.bind(this)),
+                        if(e == 'goToHighlight'){
+                            var aim = new THREE.Vector3(0,0,-1).applyQuaternion(r.quaternion).add(r.position)   
+                            a = this.player.flyToPano.bind(this.player, {pano: this.model.panos.index[r.panoId], lookAtPoint: aim }, this.actionComplete.bind(this))
+                        }else{
+                            a = this.player.warpToPanoByHeroIndex.bind(this.player, this.destinationItem, v.Show, m.Slow,  s, true, i, this.actionComplete.bind(this)) 
+                        }
+                        
+                        
                         o = this.arrivedAtDestination.bind(this, !0)
                     } else{
                         a = this.player.warpToNonPanoByHeroIndex.bind(this.player, this.destinationItem, this.actionComplete.bind(this)),
@@ -5007,8 +5014,11 @@ window.Modernizr = function(n, e, t) {
             }
             ,
             n.prototype.goToHighlight = function(e) {
-                if (this.wouldInterrupt())
+                
+                /* if (this.wouldInterrupt())
                     this.itemCompare(this.destinationItem,e,'equal') ? this.interrupt() : this.redirectToItem(e, "goToHighlight");
+                 */
+                if (this.wouldInterrupt()){}
                 else {
                     if (A.debug("<tour.goto " + e + ">"),
                     this.isInterrupted())
@@ -5016,7 +5026,7 @@ window.Modernizr = function(n, e, t) {
                     this.clearWalkingSectionPaused(),
                     this.setDestinationItem(e),
                     this.useSpecialTransition("Hilight"),
-                    this.goToDestination("noMusic"),//
+                    this.goToDestination("goToHighlight"),//
                     h.trackAlways("reach_highlight", {
                         reach_source: "thumb"
                     })