xzw %!s(int64=4) %!d(string=hai) anos
pai
achega
2b4384919e
Modificáronse 5 ficheiros con 627 adicións e 263 borrados
  1. 19 7
      edit.html
  2. 400 177
      js/edit.js
  3. 111 39
      js/main_2020_edit.js
  4. 93 36
      js/main_2020_show.js
  5. 4 4
      js/myShow.js

+ 19 - 7
edit.html

@@ -901,9 +901,9 @@
                                 <button class="innerBtn" id="addHotSpots">添加热点</button>
                             </div>
                         </li>
-                        <li class="describ noBorderbott">
+                        <!-- <li class="describ noBorderbott">
                             <label class="remark">通过添加热点,您可以进一步装饰您的场景;例如:说明文字、图片、音频、视频等。</label>
-                        </li>
+                        </li> -->
                         <li data-name="MouseMarkerColor" class="tourSelectWarp hotListSwitch">
                             <div class="itemTitle hotListSwitchTitle">
                                 <span>热点列表</span>
@@ -923,6 +923,11 @@
                                     step="0.1">
                             </ul>
                         </li>
+                        <li>
+                            <div class="buttons">
+                                <button class="innerBtn cancel" id="hotVisible">热点可视</button>
+                            </div>
+                        </li>
                         <li class="spotList">
                             <div class="itemTitle">
                                 <span>已添加的热点( <i class="hotNum"></i> )</span>
@@ -958,6 +963,13 @@
                                     <div class="itemTitle">
                                         <span>位置</span>
                                     </div>
+                                    <ul>
+                                        <li>
+                                            <input name="isSprite" class="editCheckbox" type="checkbox" value="isSprite" id="isSprite">
+                                            <label for="isSprite"></label>
+                                            <label for="isSprite">恒朝向相机 </label>
+                                        </li>
+                                    </ul>
                                     <ul class="MenuOptions innerBtn" name="transform">
                                         <li class="halfCell chosen" index="translate" data-lang="">位移</li>
                                         <!-- <li class="halfCell" index="scale" data-lang="">缩放</li> -->
@@ -1392,11 +1404,11 @@
     </div>
 
     <script> 
-        
+        /*
         //本地:
         var token ="eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsInJvbGUiOm51bGwsIm1hbmFnZXIiOm51bGwsImlkIjoxLCJ1c2VyTmFtZSI6ImFkbWluIiwiZXhwIjoxNTk3MTA5MDk0LCJpYXQiOjE1OTcwMjI2OTQsImp0aSI6ImY4YzI1MTcyLWM0NmUtNGNmYi04MjRhLWJkMmU2YWRmOWVjZSJ9.kUEmWOCJ0WONTkUI1vTToLePfzgbLiWwhU5nEWIsvlg"
         var ceshi = 'http://47.107.252.54:8105';
-        /*
+        */
         //大场景: 
         var ceshi = 'http://47.107.252.54:8105';
         var token = window.localStorage.dcj_token 
@@ -1404,14 +1416,14 @@
            window.location.href = '../list/index.html'
         }
         
-        
+        /*
         //军史馆:
         var ceshi = "http://192.168.0.44:8101/"
         var token = window.localStorage.bigscenetoken 
         if (!token) {
            window.location.href = "http://192.168.0.44:8101/bigscene/#/"
-        } */
-        
+        }
+        */
         
         
         var log = window.location.href.substring(window.location.href.indexOf("?") + 1).indexOf('log') > -1;

+ 400 - 177
js/edit.js

@@ -68,9 +68,8 @@ EditTools.prototype.active = function () {
     
     console.log(`atPanel ${that.atPanel} name ${name}`)
     switch(that.atPanel){//退出
-        case "panoVisible":
-            permitTranMode(true)
-            panoVisiSet.finishSetPanoVisible()
+        case "panoVisible": 
+            VisiSet.finishSetPanoVisible() 
             break;
         case "screen": 
             confirmSnap.addClass("hide").removeClass("unable");
@@ -80,24 +79,15 @@ EditTools.prototype.active = function () {
             EditOverlay.leave()
             break;
         case "hotpoint":
-            $("#hotpointDetail").hasClass("atRight") || $("#hotpointDetail a.close").click()
+            $("#hotpointDetail").hasClass("atRight") || $("#hotpointDetail a.close").click();
+            VisiSet.finishSetTagVisible() 
             break;    
     }
     switch(name){
-        case "panoVisible":
-            var enter = function(){ 
-                if(player.modeTran.split('-')[1] != "floorplan"){  
-                    setTimeout(panoVisiSet.beginSetPanoVisible.bind(panoVisiSet), 300)//提前一点出现
-                }   
-                player.flyToMode("floorplan",  panoVisiSet.beginSetPanoVisible.bind(panoVisiSet)); 
-            }
+        case "panoVisible": 
+            VisiSet.enterSet(VisiSet.beginSetPanoVisible.bind(VisiSet))
             $(".toolLeft").addClass("unable")
-            permitTranMode(false)
-            if(!player.modeTran){ 
-				player.afterCModeFuc = ()=>{ 
-					enter()
-				}   
-			}else enter()  
+            
             break;
         case "screen":
             confirmSnap.removeClass("hide");
@@ -143,27 +133,31 @@ EditTools.prototype.saveAll = function () {
     var hots = {}
     // 热点数据
     Array.from($('.spotList ul li')).forEach(function (dom) {
-        
-        if(dom.infoAttribute){
-            delete dom.infoAttribute.position;
-            delete dom.infoAttribute.quaternion;
+        var sid = dom.hotMesh.belongHot.sid;    
+        var hot = player.model.hots[sid];
+        hots[sid] = {
+            position: {
+              x: dom.hotMesh.position.x,
+              y: dom.hotMesh.position.y,
+              z: dom.hotMesh.position.z
+            },
+            quaternion : hot.isSprite ? hot.quaternion.toObject() : dom.hotMesh.quaternion.toObject()  
+            , 
+            isSprite :  hot.isSprite ? 1 : 0,
+            infoAttribute: dom.infoAttribute 
+             
         }
-      hots[dom.hotAttribute.belongHot.sid] = {
-        position: {
-          x: dom.hotAttribute.position.x,
-          y: dom.hotAttribute.position.y,
-          z: dom.hotAttribute.position.z
-        },
-        rotation: {
-          x: dom.hotAttribute.rotation.x,
-          y: dom.hotAttribute.rotation.y,
-          z: dom.hotAttribute.rotation.z
-        },
-        infoAttribute: dom.infoAttribute
-      }
-    })
+        if(hot.visiblePanos) hots[sid].visiblePanos = hot.visiblePanos
 
 
+        delete dom.infoAttribute.rotation;
+        delete dom.infoAttribute.position;
+        delete dom.infoAttribute.quaternion;
+         
+         
+    })
+
+    
 
     var info = {
       name: $('#pjtName').val(),
@@ -376,8 +370,10 @@ function getSeft(seft) {
   $('#camera-start').on('click', function () {
       
       
-    if(panoVisiSet.setPanoVisible){
-        return panoVisiSet.savePanoVisibles()
+    if(VisiSet.setPanoVisible){
+        return VisiSet.savePanoVisibles()
+    }else if(VisiSet.setTagVisible){
+        return VisiSet.saveTagVisibles()
     }
     
     // 这部分内容需要配合main_2018.js中来进行修改
@@ -468,6 +464,7 @@ Hotpoint.prototype.init = function (n) {
         var hot = player.model.hots[spot_id];
         info.position && hot.mesh.position.copy(info.position)
         info.quaternion && hot.mesh.quaternion.copy(info.quaternion)
+        hot.isSprite = info.isSprite
     }   
     that.hotpointDetail.addClass("atRight");
     transformControls.detach() 
@@ -509,7 +506,7 @@ Hotpoint.prototype.editHot = function (target) {
   var info = $layout.targetDOM.infoAttribute || {}
   transformControls.transCtlChangeMode("translate")
     
-  
+ this.editSpot = player.model.hots[li_id]; 
     
     
   // 参数初始化
@@ -519,18 +516,23 @@ Hotpoint.prototype.editHot = function (target) {
   info.model = info.model || [];
   info.images = info.images || [];
   info.video = info.video || [];
+    info.isSprite = this.editSpot.isSprite
+  
+  
+  
   
   
   try{
       transformControls.attach(player.model.hots[li_id].mesh)
       player.model.hots[li_id].examine(player,{dontOpen:true})//add
       
-      info.position = player.model.hots[li_id].mesh.position.clone()
-      info.quaternion = player.model.hots[li_id].mesh.quaternion.clone()
+      info.position = player.model.hots[li_id].position.clone()
+      info.quaternion = player.model.hots[li_id].quaternion.clone()
   }catch(e){} 
    
     initStyle(player.model.hots[li_id])
-
+    
+    $("#isSprite")[0].checked = this.editSpot.isSprite 
 
   var iframesHTML = info.iframe.map(function (iframe) {
     return this.inputList("请填写网页链接", iframe)
@@ -835,7 +837,7 @@ Hotpoint.prototype.addHotList = function (data, index) {
   this.spotList.children("ul").append(this.createDom(data, index));
   //保存热点信息到热点dom元素中
   var spotList = $(".spotList ul").children("#ggg_s" + index);
-  spotList[0].hotAttribute = g_HotMeshes[index];
+  spotList[0].hotMesh = g_HotMeshes[index];
   spotList.attr('data-spid', g_HotMeshes[index].belongHot.sid);
 }
 //添加热点音乐
@@ -893,142 +895,156 @@ Hotpoint.prototype.saveHot = function () {
 
   hotpointDetail.find(".tail .submit").on('click', function () {
 
-  //获取唯一标识
-  var spot_id = hotpointDetail.attr("data-id");
-  var spot = spotList.find("li[data-spid="+spot_id+"]");
-    var hot = player.model.hots[spot_id];
-    //显示loading
-    $layout.removeClass('hide');
-    var args = {};
-    //热点标题
-    var $title = hotpointDetail.find(".info input");
-    //热点内容
-    var $content = hotpointDetail.find(".info textarea");
-    //热点图片
-    var $images = hotpointDetail.find(".photo .edit-fun-images a.result");
-    //热点视频
-    var $videos = hotpointDetail.find(".video .edit-fun-images a.result");
-    //热点视频的图片
-    var $thums = hotpointDetail.find(".video .edit-fun-images .upload-thum");
-    //热点模型
-    var $modules = hotpointDetail.find(".model input");
-    //热点内嵌网页
-    var $iframes = hotpointDetail.find(".webPage input");
-    //热点音乐
-    var $miusc = hotpointDetail.find("#upload-hotBgm");
-
-    let $bgName = hotpointDetail.find('.title');
+      //获取唯一标识
+      var spot_id = hotpointDetail.attr("data-id");
+      var spot = spotList.find("li[data-spid="+spot_id+"]");
+        var hot = player.model.hots[spot_id];
+        //显示loading
+        $layout.removeClass('hide');
+        var args = {};
+        //热点标题
+        var $title = hotpointDetail.find(".info input");
+        //热点内容
+        var $content = hotpointDetail.find(".info textarea");
+        //热点图片
+        var $images = hotpointDetail.find(".photo .edit-fun-images a.result");
+        //热点视频
+        var $videos = hotpointDetail.find(".video .edit-fun-images a.result");
+        //热点视频的图片
+        var $thums = hotpointDetail.find(".video .edit-fun-images .upload-thum");
+        //热点模型
+        var $modules = hotpointDetail.find(".model input");
+        //热点内嵌网页
+        var $iframes = hotpointDetail.find(".webPage input");
+        //热点音乐
+        var $miusc = hotpointDetail.find("#upload-hotBgm");
+
+        let $bgName = hotpointDetail.find('.title');
 
 
-    new Promise(function (resolve, reject) {
-      //获取热点图片所有的路径
-      upload($images, 'images', resolve)
-    }).then(function (imgUrls) {
-      args.images = imgUrls
-      //获取热点视频所有的路径
-      return new Promise(function (resolve, reject) {
-        upload($videos, 'videos', resolve)
-      })
-    }).then(function (videoUrls) {
-      args.video = videoUrls
-      //获取热点视频图片所有的路径
-      return new Promise(function (resolve, reject) {
-        upload($thums, 'images', resolve)
-      })
-    }).then(function (thums) {
-      args.video = args.video.map(function (video, index) {
-        return {
-          url: video,
-          img: thums[index]
-        }
-      })
-    }).then(function () {
-      //获取热点音乐所有的路径
-      //console.log($miusc)
-      if ($miusc[0].files.length > 0) {
-        return new Promise(function (resolve) {
-          upload($miusc, 'miusc', function (res) {
-            resolve(res[0])
+        
+
+
+
+        new Promise(function (resolve, reject) {
+          //获取热点图片所有的路径
+          upload($images, 'images', resolve)
+        }).then(function (imgUrls) {
+          args.images = imgUrls
+          //获取热点视频所有的路径
+          return new Promise(function (resolve, reject) {
+            upload($videos, 'videos', resolve)
           })
-        })
-      } else {
-        return $miusc.attr('data-hotBgm')
-      }
-    }).then(function (src) {
-      args.backgroundMusic = src
-      args.bgName = $bgName[0].innerHTML;
-    }).then(function(){//上传style图片
-        var a = $.Deferred();
-        var doneNum = 0;
-        if(currStyle == "user" && currentHotStyleImg.length){
-            currentHotStyleImg.forEach((img)=>{
-                if(img.needSave)
-                    uploadImg(img.base64Src, function(rs){
-                        if(rs.code == 0){
-                            img.needSave = false;
-                            img.saveURL = rs.data;
-                            if(++doneNum >= currentHotStyleImg.length){
-                                a.resolve();
-                            } 
-                        }else{
-                           alert("样式图上传失败");
-                           a.reject(); 
-                        }
-                    }) 
-                else if(++doneNum >= currentHotStyleImg.length){
-                        a.resolve();
-                    }  
+        }).then(function (videoUrls) {
+          args.video = videoUrls
+          //获取热点视频图片所有的路径
+          return new Promise(function (resolve, reject) {
+            upload($thums, 'images', resolve)
+          })
+        }).then(function (thums) {
+          args.video = args.video.map(function (video, index) {
+            return {
+              url: video,
+              img: thums[index]
+            }
+          })
+        }).then(function () {
+          //获取热点音乐所有的路径
+          //console.log($miusc)
+          if ($miusc[0].files.length > 0) {
+            return new Promise(function (resolve) {
+              upload($miusc, 'miusc', function (res) {
+                resolve(res[0])
+              })
             })
-            return a.promise()
-        }else return a.resolve()
-        
-    }).then(()=>{ //获取style图的信息
-        
-        args.styleImg = [];
-        if(currStyle == "user" ){ 
-            currentHotStyleImg.forEach((img)=>{
-                args.styleImg.push(img.saveURL || img.src)
-            }) 
-            hot.styleTex = currentHotStyleImg.slice(0) 
-        }else{
-            hot.styleTex = [];
-        }  
-        hot.changeTex();   //更新材质     
-    }).then(function () {
-      //获取热点标题、内容、内嵌网页、模型网页。
-      args.title = $title.val()
-      args.content = $content.val()
-
-      var iframes = []
-      for (var i = 0; i < $iframes.length; i++) {
-        var iframe = $iframes.eq(i).val()
-        iframe && iframes.push(iframe)
-      }
-      args.iframe = iframes
+          } else {
+            return $miusc.attr('data-hotBgm')
+          }
+        }).then(function (src) {
+          args.backgroundMusic = src
+          args.bgName = $bgName[0].innerHTML;
+        }).then(function(){//上传style图片
+            var a = $.Deferred();
+            var doneNum = 0;
+            if(currStyle == "user" && currentHotStyleImg.length){
+                currentHotStyleImg.forEach((img)=>{
+                    if(img.needSave)
+                        uploadImg(img.base64Src, function(rs){
+                            if(rs.code == 0){
+                                img.needSave = false;
+                                img.saveURL = rs.data;
+                                if(++doneNum >= currentHotStyleImg.length){
+                                    a.resolve();
+                                } 
+                            }else{
+                               alert("样式图上传失败");
+                               a.reject(); 
+                            }
+                        }) 
+                    else if(++doneNum >= currentHotStyleImg.length){
+                            a.resolve();
+                        }  
+                })
+                return a.promise()
+            }else return a.resolve()
+            
+        }).then(()=>{ //获取style图的信息
+            
+            args.styleImg = [];
+            if(currStyle == "user" ){ 
+                currentHotStyleImg.forEach((img)=>{
+                    args.styleImg.push(img.saveURL || img.src)
+                }) 
+                hot.styleTex = currentHotStyleImg.slice(0) 
+            }else{
+                hot.styleTex = [];
+            }  
+            hot.changeTex();   //更新材质     
+        }).then(function () {
+          //获取热点标题、内容、内嵌网页、模型网页。
+          args.title = $title.val()
+          args.content = $content.val()
+
+          var iframes = []
+          for (var i = 0; i < $iframes.length; i++) {
+            var iframe = $iframes.eq(i).val()
+            iframe && iframes.push(iframe)
+          }
+          args.iframe = iframes
 
-      var modules = []
-      for (var i = 0; i < $modules.length; i++) {
-        var module = $modules.eq(i).val()
-        module && modules.push(module)
-      }
-      args.model = modules
-      
-      
-      args.position = hot.mesh.position.clone()
-      args.quaternion = hot.mesh.quaternion.clone()
-
-      return args
-    }).then(function (args) {
-      console.log(args);
-      //把获取的所有信息都保存在对应热点的dom元素里面
-      hotpointDetail[0].targetDOM.infoAttribute = args;
-      $layout.addClass('hide');
-      hotpointDetail.addClass("atRight");
-      spot.find(".title").html(args.title);
-      transformControls.detach() 	
-    })
+          var modules = []
+          for (var i = 0; i < $modules.length; i++) {
+            var module = $modules.eq(i).val()
+            module && modules.push(module)
+          }
+          args.model = modules
+          
+          
+          args.position = hot.mesh.position.clone()
+          args.quaternion = hot.mesh.quaternion.clone()
+
+          return args
+        }).then(function (args) {
+          console.log(args);
+          //把获取的所有信息都保存在对应热点的dom元素里面
+          hotpointDetail[0].targetDOM.infoAttribute = args;
+          $layout.addClass('hide');
+          hotpointDetail.addClass("atRight");
+          spot.find(".title").html(args.title);
+          transformControls.detach() 	
+        })
   })
 
+    var _this = this;
+    $("#isSprite").on("change",function(e){
+        _this.editSpot.isSprite = this.checked;
+        if(this.checked){
+            _this.editSpot.update(player.camera)
+        }else{
+            _this.editSpot.mesh.quaternion.copy(_this.editSpot.quaternion)
+        }
+        
+    })
 
 }
 
@@ -2599,21 +2615,48 @@ var EditOverlay = {
 //----------------漫游可见性---------------------------------
  
 
-var panoVisiSet = {
+var VisiSet = {
     
     
     setPanoVisible : false, 
-    //漫游可见性
-     
+    setTagVisible : false, 
+    
     panoVLines : {},//线条
-    panoVTemp:null, //修改后还没保存的临时数据
+    panoVTemp:{}, //修改后还没保存的临时数据
+    
+    tagVsetting:null,//正在设置的热点中心点
+    tagsVLines : {}, //线条
+     
+    //tagVTemp //修改后还没保存的临时数据
+    
+    
+    
     //热点可见性
     $confirmSnap : $("#camera-start"), 
     colors:{green: "#00c8ae"},
     init : function(){
         this.meshGroup = new THREE.Object3D;  this.meshGroup.name = "setVisible-group"
 		player.model.add(this.meshGroup)
+        $("#hotVisible").on("click",()=>{
+            VisiSet.enterSet(VisiSet.beginSetTagVisible.bind(VisiSet))
+        })
     }, 
+    enterSet:function(fun){
+        var enter = function(){ 
+            if(player.modeTran.split('-')[1] != "floorplan"){  
+                setTimeout(fun, 300)//提前一点出现
+            }   
+            player.flyToMode("floorplan",  fun); 
+        }
+            
+        permitTranMode(false)
+        if(!player.modeTran){ 
+            player.afterCModeFuc = ()=>{ 
+                enter()
+            }   
+        }else enter()  
+        
+    },
 	beginSetPanoVisible : function () { 
 		if (this.setPanoVisible ) return;
         $(".toolLeft").removeClass("unable")
@@ -2746,7 +2789,7 @@ var panoVisiSet = {
 		this.panoVTemp = {};
 		player.flyoutType = null
 		this.$confirmSnap.addClass("hide")
-		 
+        permitTranMode(true)
 	}, 
 
 	 
@@ -3040,6 +3083,7 @@ var panoVisiSet = {
 			var geo = new THREE.PlaneGeometry(scale, scale, 1, 1)
 			var panos = player.model.panos;
 			for (var r in panos.index) {
+                if(!panos.index[r].isAligned())continue;
 				var t = THREE.UniformsUtils.clone(shaders.waypoint.uniforms);
 				t.map.value = footTex1
 				t.color.value.set("#ffffff");
@@ -3090,7 +3134,7 @@ var panoVisiSet = {
 
 
 	checkHasNeighbor : function(pano, state){ //检查当前状态pano点是否有可通行点
-		var neighbours = this.panoVTemp && this.panoVTemp[pano.id] ? this.panoVTemp[pano.id].neighbourPanos :  pano.neighbourPanos;
+		var neighbours = /* this.panoVTemp &&  */this.panoVTemp[pano.id] ? this.panoVTemp[pano.id].neighbourPanos :  pano.neighbourPanos;
 		
 		if(state != "showFoot" && pano == this.panoVsetting){//是中心点的话。state == "showFoot"代表是showFootIcon时, 这时候线还没创建,无法用线判断中心点有几个相邻点,直接用neighbourPanos
 			for(var i in this.panoVLines){
@@ -3175,6 +3219,185 @@ var panoVisiSet = {
 		})  
 	}
     
+    //========热点可见性==============  
+    ,
+    beginSetTagVisible : function () { 
+		if (this.setTagVisible ) return; 
+        $(".toolTop").addClass("unable")
+        $("#hotVisible").addClass("unable")
+         
+		this.setTagVisible = true;
+		this.tagVTemp = {}; 
+		
+		this.$confirmSnap.text('完成设置').removeClass("hide")
+		
+		//objects.tagManager.hideAllTags();
+		for(let i in player.model.hots){
+            player.model.hots[i]._isSprite = player.model.hots[i].isSprite;
+            player.model.hots[i].isSprite = true;
+            player.model.hots[i].mesh.material.depthTest = false;
+        }
+ 		 
+		this.updateFootIconSize()//更新一下大小,尤其是上次换了中心点然后退出又进入但是镜头没有变化的话 
+	},
+    SetOneTagVisible : function (tag) {
+		//点击某个热点后就对该热点进行设置,或者在热点修改时对其进行设置
+		if (this.tagVsetting == tag) return;
+		if (this.tagVsetting){
+			this.saveLastTagVi(this.tagVsetting);
+			//this.tagVsetting.setElemType(this.tagVsetting.style, this.tagVsetting.styleImageURL); 
+		} 
+
+		this.tagVsetting = tag; //记录正在修改的
+		this.delVisibleLines(); //删除线
+		this.showFootIcons(player.currentPano); 
+		this.createTagVisiLines(tag); //创线
+		 
+		this.updateFootIconSize()//更新一下大小,尤其是上次换了中心点然后退出又进入但是镜头没有变化的话
+ 	}
+	, 
+    saveLastTagVi : function () { //保存刚设置过的tag
+		var change = false;
+		var newVPs = this.tagVTemp[this.tagVsetting.sid] || this.tagVsetting.visiblePanos.slice(0);
+		for (var r in this.tagsVLines) {
+			var line = this.tagsVLines[r];
+			if (line.name.indexOf("new") > -1 && line.visible) {
+				//新设置为visible且没有取消  
+				newVPs.push(r)
+				change = true;
+				//console.log("add: "+r)
+			} else if (line.name.indexOf("new") == -1 && !line.visible) {
+				//旧的且已经取消
+				var i = newVPs.indexOf(r);
+				if (i == -1) {
+					console.log("visiblePanos删除error");
+					continue;
+				}
+				newVPs.splice(i, 1);
+				change = true;
+				//console.log("sub: "+r)
+			}
+		}
+		if (change) {
+			this.tagVTemp[this.tagVsetting.sid] = newVPs;
+		}
+	}
+	,	 
+    pauseSetTagVisible : function () {	//pc保存后删除连线 但还在继续设置 点选热点即开始
+		if (!this.setTagVisible || !this.tagVsetting) return;
+		//this.tagVsetting.setElemType(this.tagVsetting.style, this.tagVsetting.styleImageURL ); 
+		this.delVisibleLines();
+		this.hideFootIcons();
+		this.tagVTemp = {};
+		this.tagVsetting = null;
+	}
+    ,
+    finishSetTagVisible : function () {
+		if (!this.setTagVisible) return; 
+        $(".toolTop").removeClass("unable")
+        $("#hotVisible").removeClass("unable")
+		this.pauseSetTagVisible();
+		this.setTagVisible = false;
+		
+		 
+        //this.setDisplay(false)
+        this.$confirmSnap.addClass("hide")
+        permitTranMode(true)
+		/* for (var r in objects.tagManager.tags) {
+            if(objects.tagManager.tags[r].state == "videoPanoFlag")continue;            
+            objects.tagManager.tags[r].disc.visible = false;
+			objects.tagManager.tags[r].disc.material.depthTest = true; 
+		} */  
+        for(let i in player.model.hots){
+            player.model.hots[i].isSprite = player.model.hots[i]._isSprite;
+            player.model.hots[i].isSprite || player.model.hots[i].mesh.quaternion.copy(player.model.hots[i].quaternion)
+            player.model.hots[i].mesh.material.depthTest = true;
+        }
+	}
+    ,
+
+	/* saveTagVisibles : function () { //保存到服务器  
+		if (this.tagVsetting) this.saveLastTagVi(this.tagVsetting); //获取最后设置的那个热点的改动
+		//可能出现数据没变但保存的情况。比如先改变了然后切换别的热点但切换回来时又改回来。
+		var tags = [];
+		for (var i in this.tagVTemp) {
+			tags.push({
+				sid: i,
+				value: this.tagVTemp[i]//turnToPanoIndex(this.tagVTemp[i])
+			})
+		}
+
+		 
+		if (tags.length == 0) {//没有需要保存的改动
+			 
+			this.finishSetTagVisible()
+			return;
+		}
+		 
+		return tags; 
+	} */
+     
+	//afterSaveTagVisibles : function(){
+    saveTagVisibles : function () { 
+        if (this.tagVsetting) this.saveLastTagVi(this.tagVsetting); 
+		for (var i in this.tagVTemp) {  //保持成功于是生效   
+			player.model.hots[i].visiblePanos = this.tagVTemp[i];
+		} 
+		this.finishSetTagVisible()//还是保存完直接结束吧,因为现在热点可视不放在单独的设置页面了
+	}
+	,
+    createTagVisiLines : function (tag) {
+		//  热点可见性线条
+        var panos = player.model.panos;
+        tag.visiblePanos || tag.setVisiblePanos("get")
+        
+		var visibleList = this.tagVTemp[tag.sid] || tag.visiblePanos;
+		//如果是刚在设置的要读取设置过的数据
+		for (var r = 0; r < visibleList.length; r++) {
+			var pano = panos.index[visibleList[r]];
+			this.createTagSingleLine(pano, "old", tag)
+		}
+	}
+    ,
+	createTagSingleLine : function (pano, type, tag) {
+		var panos = player.model.panos;
+        var line = LineDraw.createLine([pano.floorPosition.clone()/* .sub(this.position) */, tag.mesh.position.clone()], {
+			color: this.colors.green
+		});
+		this.meshGroup.add(line);
+		line.name = "tagVL-" + type + "-" + pano.id;
+		this.tagsVLines[pano.id] = line;
+		this.changeFIconState(panos.index[pano.id].footIcon, "linked")
+
+	}
+    ,
+	dealTagVisible : function (tag, panoName) {
+		//外部调用
+        var panos = player.model.panos;
+		if (this.tagsVLines[panoName]) {
+			this.tagsVLines[panoName].visible = !this.tagsVLines[panoName].visible;
+			this.changeFIconState(panos.index[panoName].footIcon, this.tagsVLines[panoName].visible?"linked":false)
+		} else {
+			this.createTagSingleLine(panos.index[panoName], "new", tag)
+		}
+	}
+    ,
+	delVisibleLines : function () {
+		//xzw add  所有线都删除
+		for (var i in this.tagsVLines) {
+			this.tagsVLines[i].geometry.dispose();
+			this.tagsVLines[i].material.dispose();
+			this.meshGroup.remove(this.tagsVLines[i]);
+			delete this.tagsVLines[i];
+		}
+		for (var i in this.panoVLines) {
+			this.panoVLines[i].geometry.dispose();
+			this.panoVLines[i].material.dispose();
+			this.meshGroup.remove(this.panoVLines[i]);
+			delete this.panoVLines[i];
+		}
+	}
+    
 }
 
 

+ 111 - 39
js/main_2020_edit.js

@@ -8347,8 +8347,8 @@ function o(a, s, l) {
         function a() {
             _.is(":visible") ? n() : r()
         }
-        function s() {
-            if (!h.tourInteraction.disabled) {
+        function s() {//去掉导览结束时的提示
+            /* if (!h.tourInteraction.disabled) {
                 T.removeClass("small landing " + d.FLOORPLAN + " " + d.OUTDOOR + " " + d.PANORAMA),
                 T.addClass("fadeIn tour " + p.deviceType);
                 var e, t = h.tourInteraction.smallModal ? m.SMALL : m.LARGE;
@@ -8357,7 +8357,7 @@ function o(a, s, l) {
                     p.fill(x, g.TOUR_INTERACTION[e]),
                     T.addClass(e);
                 T.addClass(t)
-            }
+            } */
         }
         function l(e, t) {
             if (t) {
@@ -14791,22 +14791,31 @@ function o(a, s, l) {
         "use strict";
         function n(e, t, i) {
             this.sid = e,
-            this.position = (new g.Vector3).fromArray( this.conversionArray(t.position) )
+            this.position =  this.convertValue(t.position, g.Vector3)     
             
             if(t.quaternion){
-                this.quaternion = t.quaternion;
+                this.quaternion =   this.convertValue(t.quaternion, g.Quaternion) 
             }else{
-                this.rotation = this.conversionArray(t.rotation) 
+                this.rotation = new g.Euler().setFromVector3(this.convertValue(t.rotation, g.Vector3 )) 
             }
+            
+            this.quaternion || (this.quaternion = new THREE.Quaternion().setFromEuler(this.rotation)) 
+            this.isSprite = t.isSprite
+            
             this.link = t.link,
             this.model = i,
             this.size = t.size;
-            console.log(t.position)
+      
             this.styleTex = [] // 存储热点icon的图片 [{src:...}, {src:...} ] 最多两个,里面是带有src的object, 可以是img
-             
+            
             this.build()
             t.infoAttribute && t.infoAttribute.title && this.createTitleElem(t.infoAttribute.title)
+            
             this.changeTex()
+            
+            this.setVisiblePanos(t.visiblePanos); 
+		
+            
         }
         var g = e("three")
           , r = e("../shaders")
@@ -14823,7 +14832,6 @@ function o(a, s, l) {
         var defaultTex1 = o.load(g_HotImage.point);
         var defaultTex2 = o.load(g_HotImage.point2)
         
-          
         
         n.prototype.changeTex = function(){
             var u = this.mesh.material.uniforms
@@ -14844,8 +14852,18 @@ function o(a, s, l) {
             })
             this.changeTex()
         }
-     
-        
+        n.prototype.update = function(camera) {
+            if(this.isSprite){
+                this.mesh.quaternion.copy(camera.quaternion)
+            }
+        }
+        n.prototype.setVisiblePanos = function(visibleData){ 
+            if(visibleData == "get"){ 
+                this.visiblePanos = player.model.panos.list.map((pano)=>{return pano.id})
+            }else if(visibleData){
+                this.visiblePanos = visibleData;
+            }
+        }
         n.prototype.build = function() {
             var t = g.UniformsUtils.clone(r.hot.uniforms); 
             var e = new g.Mesh(a, new g.ShaderMaterial({ 
@@ -14856,12 +14874,9 @@ function o(a, s, l) {
             }))
               , t = parseFloat(window.MP_PREFETCHED_MODELDATA.hotIconScale);
             e.dynamic = !0,
-            e.position.copy(this.position);
-            if(this.quaternion){
-                e.quaternion.copy(this.quaternion)
-            }else{
-                e.rotation.copy((new g.Euler).fromArray(this.rotation));
-            }
+            e.position.copy(this.position); 
+            e.quaternion.copy(this.quaternion)
+            
             t && e.scale.set(t, t, t),
             e.name = this.sid,
             e.type = "hotSprite",
@@ -15000,15 +15015,25 @@ function o(a, s, l) {
         }
         
         ,
-        n.prototype.conversionArray = function(e) {
+       /*  n.prototype.conversionArray = function(e) {
             if ("[object Array]" == Object.prototype.toString.call(e))
                 return e;
             var t = [];
             for (var i in e)
                 t.push(parseFloat(e[i])); 
             return t   
-        }
-         
+        } */
+        n.prototype.convertValue = function(v ,Type){
+            var value; 
+            if(v instanceof Array){
+                v.forEach((v1)=>{v1 = parseFloat(v1)})
+                value = new Type().fromArray(v);
+            }else{
+                for(let i in v){v[i] = parseFloat(v[i])}
+                value = new Type().copy(v);
+            }
+            return value
+        } 
         
         ,
         t.exports = n
@@ -15205,6 +15230,7 @@ function o(a, s, l) {
             }
             ,
             d.prototype.examine = function(i) {
+                if(!player.currentPano)return;
                 var e = i.mode
                   , n = g.tags.navigate.nearestPano && this.closestPanoTowardTag(e, i.currentPano) || i.currentPano
                   , t = this.disc.getWorldPosition();
@@ -16963,7 +16989,8 @@ function o(a, s, l) {
             t.prototype.setMode = function(t) {
                 if (!this.supportedModes[t])
                     throw new x("Mode not supported for this model: " + t);
-                this.mode = t,
+                this.mode = t 
+                this.skybox.material.transparent = t == "panorama" ? false : true //xzw add // 如果skybox透明,会让其中其他mesh 如热点的透明出问题 
                 this.chunks.forEach(function(e) {
                     e.setMode(t)
                 })
@@ -17304,7 +17331,7 @@ function o(a, s, l) {
     142: [function(e, t, i) {
         "use strict";
         function n(e, t, i) {
-            var n = (e = e.clone()).size()
+            var n = (e = e.clone().expandByScalar(0.01)).size()
               , r = new o.BoxGeometry(n.x,n.y,n.z);
             r.boundingBox = e,
             o.Mesh.call(this, r, t),
@@ -20612,12 +20639,17 @@ function o(a, s, l) {
                         !0;
                         
                     //add----   
-
-                    if (window.panoVisiSet && panoVisiSet.setPanoVisible) {//正在设置漫游可行
-                        this.intersect && this.intersect.object.visible && panoVisiSet.dealPanoVisible(this.intersect.object.name);
+                    if (this.checkHotClick())
+                        return !0;
+                    
+                    if (window.VisiSet && VisiSet.setPanoVisible) {//正在设置漫游可行
+                        this.intersect && this.intersect.object.visible && VisiSet.dealPanoVisible(this.intersect.object.name);
+                        return;
+                    }
+                    if (window.VisiSet && VisiSet.setTagVisible ) { 
+                        VisiSet.tagVsetting && this.intersect && this.intersect.object.visible && VisiSet.dealTagVisible(VisiSet.tagVsetting, this.intersect.object.name);
                         return;
                     }
-                    
 
                     
                     if(this.hoveringPlane){
@@ -20633,8 +20665,7 @@ function o(a, s, l) {
                             else if(objects.mainDesign.editType == "addOverlay")return !0;
                         } */
                     //----------    
-                    if (this.checkHotClick())
-                        return !0;
+                    
                     if (this.cameraControls.activeControl && this.cameraControls.activeControl.emit(u.Move, this.isTouchEvent ? "touch" : "mouse"),
                     this.history.invalidate(),
                     this.intersect)
@@ -20685,7 +20716,7 @@ function o(a, s, l) {
                 window.initOverlay(B)
                 this.model.loadOverlays() 
                 window.EditOverlay && window.EditOverlay.init(B);
-                window.panoVisiSet && panoVisiSet.init()
+                window.VisiSet && VisiSet.init()
                 
                 //-------------------
                 var t = e.mode
@@ -20877,8 +20908,11 @@ function o(a, s, l) {
                     !this.mouseDown && this.containsMouse && this.updateIntersect()  
                     this.emit(W.ViewChanged)
                     //add:
-                    if (window.panoVisiSet && panoVisiSet.setPanoVisible) panoVisiSet.updateFootIconSize();
+                    if (window.VisiSet && (VisiSet.setPanoVisible || VisiSet.setTagVisible)) VisiSet.updateFootIconSize();
                     this.intersectHot && this.intersectHot.showTitle()
+                    for(var i in this.model.hots){
+                        this.model.hots[i].update(this.camera)
+                    }
                     
                 }
                 this.model.supportsTiles && (this.updateTileDownloader(F),
@@ -21033,8 +21067,8 @@ function o(a, s, l) {
                 e || t || this.isTouchEvent || i.length && i[0].running;
                 
                 
-                if (window.panoVisiSet && panoVisiSet.setPanoVisible) {
-                    this.intersect = this.getMouseIntersect(null, panoVisiSet.footIcons);
+                if (window.VisiSet && (VisiSet.setPanoVisible || VisiSet.setTagVisible)) {
+                    this.intersect = this.getMouseIntersect(null, VisiSet.footIcons);
                     if (this.intersect && this.intersect.object.visible )
                         $("#player").css("cursor", "pointer");
                     else
@@ -21053,9 +21087,15 @@ function o(a, s, l) {
             }
             ,
             t.prototype.checkHotClick = function() {
-                if (this.intersectHot)
+                if (this.intersectHot){
+                    if (window.VisiSet && VisiSet.setTagVisible ) {
+                        VisiSet.SetOneTagVisible(this.intersectHot); //设置这个热点的可见性
+                        return;
+                    }
+                    
                     return this.intersectHot.examine(this),
                     !0
+                }
             }
             ,
             t.prototype.getMouseDirection = function(e) {
@@ -21251,11 +21291,27 @@ function o(a, s, l) {
             t.prototype.updateMarkerVisi = function() {//加 
                 if(this.mode != "panorama")return;
                 this.model.panos.list.forEach((pano)=>{
+                    if(!pano.marker)return;
                     pano.marker.material.visible = !!pano.neighbourPanos[this.currentPano.id];
                 })
             }
             ,
-
+            t.prototype.updateHotVisible = function(pano){  
+                var hots = this.model.hots;
+                pano = pano || this.currentPano; 
+                
+                for (var index in hots){
+                    var visible; 
+                    if(this.mode != "panorama"){
+                        visible = true;
+                    }else{ 
+                        //hots[index].mesh.material.depthTest = false;  
+                        visible = !hots[index].visiblePanos || hots[index].visiblePanos.indexOf(pano.id) > -1
+                    }
+                    hots[index].mesh.visible = visible; 
+                } 
+            },
+                
             
             t.prototype.flyToPano = function(e, t) {
                 var i, n = e.pano, r = e.lookAtPoint, o = e.duration, a = e.aimDuration, s = e.maxDistanceOverride, l = e.skipWarpingCheck, c = e.constantMoveSpeed, h = null, u = null;
@@ -21334,9 +21390,18 @@ function o(a, s, l) {
                     this.flying = !0;
                     var _ = this.position.clone()
                       , b = this.currentPano;
-                    Y.debug("Flying to pano ", n.position),
-                    this.emit(W.PanoChosen, this.currentPano, n),
-                    this.emit(W.FlyingStarted, n.position, _, n, b),
+                    Y.debug("Flying to pano ", n.position);
+                    this.emit(W.PanoChosen, this.currentPano, n);
+                    this.emit(W.FlyingStarted, n.position, _, n, b);
+                    
+                    
+                    
+                    this.updateHotVisible(n); //更新热点显示
+                    
+                    
+                    
+                    
+                    
                     r && G.start(function(e) {
                         y.copy(g),
                         H.quaternion(y, v)(e),
@@ -21344,6 +21409,7 @@ function o(a, s, l) {
                         this.cameraControls.activeControl.lookAt(A)
                     }
                     .bind(this), p, null, 0, z[k.transition.movementEasing], null, q.LookTransition);
+                    
                     var w = c ? null : z[k.transition.movementEasing];
                     this.nextPano = n,
                     G.start(H.uniform(this.model.skybox, "progress", 1), p, null, 0, z[k.transition.blendEasing], "skyFly", q.FlyToPano),
@@ -21662,9 +21728,11 @@ function o(a, s, l) {
                 
                 
                 this.modeTran = this.mode + "-" + i;
-                if(this.mode == "floorplan" && window.panoVisiSet && panoVisiSet.setPanoVisible){
-                    panoVisiSet.finishSetPanoVisible()
+                if(this.mode == "floorplan" && window.VisiSet && (VisiSet.setPanoVisible || VisiSet.setTagVisible)){
+                    VisiSet.finishSetPanoVisible()
+                    VisiSet.finishSetTagVisible()
                 }
+                
                 if(editTool.atPanel == "screen"){
                     if(this.mode == "panorama") $(".confirmSnap").addClass("unable")
                     else if(i == "panorama") $(".confirmSnap").removeClass("unable")
@@ -21757,6 +21825,7 @@ function o(a, s, l) {
                         cf(); 
                     }
                     this.updateMarkerVisi();//add
+                    (u === V.PANORAMA || i == V.PANORAMA) && this.updateHotVisible()//add
                     
                     c && u !== V.PANORAMA && i === V.PANORAMA ? this.startWarp(M.Retain, S.Retain, R.BLACK, null, null, a) : (a && a(),
                     t.resolve())
@@ -37298,6 +37367,9 @@ function o(a, s, l) {
             clone: function() {
                 return new this.constructor(this._x,this._y,this._z,this._w)
             },
+            toObject:function(){//add
+                return {x:this.x, y:this.y,z:this.z, w:this.w};
+            },
             copy: function(e) {
                 return this._x = e.x,
                 this._y = e.y,

+ 93 - 36
js/main_2020_show.js

@@ -6218,7 +6218,7 @@ window.Modernizr = function(n, e, t) {
                    BorderRadius(topRadius.bottom,topRadius.top);
                 }
                 //判断someData里面是否有special字段,如果有就会处理这些特殊的大场景
-                if(window.MP_PREFETCHED_MODELDATA.model.special || window.MP_PREFETCHED_MODELDATA.special === "true"){
+                if(window.MP_PREFETCHED_MODELDATA.model.special || window.MP_PREFETCHED_MODELDATA.special){
                     window.specialScene && specialScene.special().afterImplement();
                 }
 
@@ -8703,8 +8703,8 @@ window.Modernizr = function(n, e, t) {
             E.classList.remove("playing"),
             h()
         }
-        function h() {
-            if (!p.tourInteraction.disabled) {
+        function h() {//去掉导览结束时的提示
+            /* if (!p.tourInteraction.disabled) {
                 M.removeClass("small landing " + g.FLOORPLAN + " " + g.OUTDOOR + " " + g.PANORAMA),
                 M.addClass("fadeIn tour " + m.deviceType);
                 var e = p.tourInteraction.smallModal ? y.SMALL : y.LARGE;
@@ -8715,7 +8715,7 @@ window.Modernizr = function(n, e, t) {
                     M.addClass(t)
                 }
                 M.addClass(e)
-            }
+            } */
         }
         function u(e, t) {
             if (t) {
@@ -15366,23 +15366,34 @@ window.Modernizr = function(n, e, t) {
         "use strict";
 		function hot(sid,d,model){
 			this.sid = sid;
-            this.position = (new r.Vector3).fromArray( this.conversionArray(d.position) )
+           /*  this.position = (new r.Vector3).fromArray( this.conversionArray(d.position) )
 			if(d.quaternion){
                 this.quaternion = d.quaternion;
             }else{
                 this.rotation = this.conversionArray(d.rotation) 
-            }
-            
+            } */
             
+            this.position =  this.convertValue(d.position, r.Vector3)    
+            if(d.quaternion){
+                this.quaternion =   this.convertValue(d.quaternion, r.Quaternion) 
+            }else{
+                this.rotation = new r.Euler().setFromVector3(this.convertValue(d.rotation, r.Vector3 )) 
+            }
+            this.quaternion || (this.quaternion = new THREE.Quaternion().setFromEuler(this.rotation)) 
+            this.isSprite = d.isSprite
             this.link = d.link;
 			this.model = model;
 			this.size = d.size;
             
             this.styleTex = [] // 存储热点icon的图片 [{src:...}, {src:...} ] 最多两个,里面是带有src的object, 可以是img
+           
             
 			this.build();
             d.infoAttribute && d.infoAttribute.title && this.createTitleElem(d.infoAttribute.title)
             this.changeTex()
+            
+            this.setVisiblePanos(d.visiblePanos); 
+            
 		}
 		var r = e("three")
 		, f = e("../shaders")
@@ -15419,8 +15430,16 @@ window.Modernizr = function(n, e, t) {
             this.changeTex()
         }
      
-
-
+        hot.prototype.update = function(camera) {
+            if(this.isSprite){
+                this.mesh.quaternion.copy(camera.quaternion)
+            }
+        }
+        hot.prototype.setVisiblePanos = function(visibleData){ 
+            if (visibleData) {
+                this.visiblePanos = visibleData;
+            } 
+        }
         
 		 //绘制热点
 		hot.prototype.build = function(){
@@ -15435,11 +15454,7 @@ window.Modernizr = function(n, e, t) {
             var hotIconScale = parseFloat(window.MP_PREFETCHED_MODELDATA.hotIconScale);
 			sprite.dynamic = true; 
 			sprite.position.copy(this.position);
-            if(this.quaternion){
-                sprite.quaternion.copy(this.quaternion)
-            }else{
-                sprite.rotation.copy((new r.Euler).fromArray(this.rotation));
-            }
+            sprite.quaternion.copy(this.quaternion)
             hotIconScale && sprite.scale.set(hotIconScale, hotIconScale, hotIconScale)
 			// this.size && sprite.scale.set(this.size,this.size,this.size);
 			sprite.name = this.sid; 
@@ -15469,6 +15484,7 @@ window.Modernizr = function(n, e, t) {
         
         
 		hot.prototype.closestPanoTowardTag = function(e, t) {
+            
 			var i = []
 			  , o = []
 			  , l = this.mesh.position;
@@ -15515,6 +15531,7 @@ window.Modernizr = function(n, e, t) {
             
 		
 		hot.prototype.examine = function(e, hotListSta) { 
+            if(!player.currentPano)return;
 			var hotPop = document.getElementById('popup');
             //获取那个热点的链接 
 			if(this.link){
@@ -15616,15 +15633,25 @@ window.Modernizr = function(n, e, t) {
         // }
         
 		//czj 判断是否是数组 如果不是将对象转换为数组
-        hot.prototype.conversionArray = function(obj){
+        /* hot.prototype.conversionArray = function(obj){
             if(Object.prototype.toString.call(obj)=='[object Array]') return obj;
             var arr = []
             for (var i in obj) {
                 arr.push(obj[i]); //属性
             }
             return arr
-        }
-		
+        } */
+		hot.prototype.convertValue = function(v ,Type){
+            var value; 
+            if(v instanceof Array){
+                v.forEach((v1)=>{v1 = parseFloat(v1)})
+                value = new Type().fromArray(v);
+            }else{
+                for(let i in v){v[i] = parseFloat(v[i])}
+                value = new Type().copy(v);
+            }
+            return value
+        } 
 		
         t.exports = hot;
     }
@@ -17700,7 +17727,8 @@ window.Modernizr = function(n, e, t) {
             n.prototype.setMode = function(e) {
                 if (!this.supportedModes[e])
                     throw new R("Mode not supported for this model: " + e);
-                this.mode = e,
+                this.mode = e;
+                this.skybox.material.transparent = e == "panorama" ? false : true //xzw add // 如果skybox透明,会让其中其他mesh 如热点的透明出问题 
                 this.chunks.forEach(function(t) {
                     t.setMode(e)
                 })
@@ -17742,7 +17770,7 @@ window.Modernizr = function(n, e, t) {
                 this.floors.forEach(function(e) {
                     O.info("Floor " + e + ": " + e.children.length + " chunks, " + e.panos.length + " panos.")
                 }
-                .bind(this)),
+                .bind(this)), 
                 this.panos.populate_path_graph(),
                 this.skybox = new l(this.boundingBox),
                 this.skybox.matrixWorldNeedsUpdate = !0,
@@ -17754,11 +17782,15 @@ window.Modernizr = function(n, e, t) {
 				
                 for (var t in this.tags)
                     this.tags[t].build();
+                
+                this.createFloorLogo()
+                
                 return O.debug("Done building model"),
                 v.raycastsDone > 0 && (O.warn("raycasts: " + v.raycastsDone),
                 O.warn("raycasts skipped: " + v.raycastsSkipped)),
                 this.buildRooms(),
                 this.labels.associateWithRooms(this.rooms), 
+                 
                 $.when(this)
             }
             ,
@@ -18045,8 +18077,8 @@ window.Modernizr = function(n, e, t) {
     }],
     142: [function(e, t, i) {
         "use strict";
-        function n(e, t, i) {
-            e = e.clone();
+        function n(e, t, i) { 
+            e = e.clone().expandByScalar(0.01);//改
             var n = e.size()
               , o = new r.BoxGeometry(n.x,n.y,n.z);
             o.boundingBox = e,
@@ -21520,15 +21552,15 @@ window.Modernizr = function(n, e, t) {
                         return this.path.activeTransType === x.WALK && this.emit(w.WarpInterruptedWithFlyTo, this.path.activeTransType),
                         !0;
                         
-                    //add----    
+                    //add----  
+					if(this.checkHotClick())//add 
+						return !0;
+                        
                     if(this.hoveringPlane){
                         this.clickOverlay(this.hoveringPlane)
                         return;
                     }    
                         
-                        
-					if(this.checkHotClick())//add 
-						return !0;
                     if (this.cameraControls.activeControl && this.cameraControls.activeControl.emit(_.Move, this.isTouchEvent ? "touch" : "mouse"),
                     this.history.invalidate(),
                     this.intersect)
@@ -21764,13 +21796,16 @@ window.Modernizr = function(n, e, t) {
                 return function(i) {
                     this.updatePersistentZooming(i),
                     this.updateFromControls(i),
-                    this.getCurrentNodePanos(t),
-                    this.hasChanged(e) && (this.lastChangeTime = Date.now(),
+                    this.getCurrentNodePanos(t) 
+                    if(this.hasChanged(e) ) {
+                        this.lastChangeTime = Date.now(),
                         !this.mouseDown && this.containsMouse && this.updateIntersect(),
                         this.emit(w.ViewChanged),
-                        this.intersectHot && this.intersectHot.showTitle()
-                    
-                    ),
+                        this.intersectHot && this.intersectHot.showTitle() 
+                        for(var i in this.model.hots){
+                            this.model.hots[i].update(this.camera)
+                        }
+                    }
                     this.model.supportsTiles && (this.updateTileDownloader(t),
                     this.updatePanoRenderer(t)),
                     this.updatePreRendering(t),
@@ -22197,12 +22232,26 @@ window.Modernizr = function(n, e, t) {
             n.prototype.updateMarkerVisi = function() {//加
                 if(this.mode != "panorama")return;
                 this.model.panos.list.forEach((pano)=>{
+                    if(!pano.marker)return;
                     pano.marker.material.visible = !!pano.neighbourPanos[this.currentPano.id];
                 })
             }
             ,
-
-            
+            n.prototype.updateHotVisible = function(pano){  
+                var hots = this.model.hots;
+                pano = pano || this.currentPano; 
+                
+                for (var index in hots){
+                    var visible; 
+                    if(this.mode != "panorama"){
+                        visible = true;
+                    }else{ 
+                        //hots[index].mesh.material.depthTest = false;  
+                        visible = !hots[index].visiblePanos || hots[index].visiblePanos.indexOf(pano.id) > -1
+                    }
+                    hots[index].mesh.visible = visible; 
+                } 
+            },
             n.prototype.flyToPano = function(e, t) {
                 var i = e.pano
                   , n = e.lookAtPoint
@@ -22292,7 +22341,11 @@ window.Modernizr = function(n, e, t) {
                       , D = this.currentPano;
                     F.debug("Flying to pano ", i.position),
                     this.emit(w.PanoChosen, this.currentPano, i),
-                    this.emit(w.FlyingStarted, i.position, L, i, D),
+                    this.emit(w.FlyingStarted, i.position, L, i, D)
+                    
+                    this.updateHotVisible(i); //更新热点显示
+                    
+                    
                     n && y.start(function(e) {
                         S.copy(b),
                         v.quaternion(S, T)(e),
@@ -22699,9 +22752,12 @@ window.Modernizr = function(n, e, t) {
                     this.spider.draw()),
                     p === u.DOLLHOUSE && this.cameraControls.controls[u.DOLLHOUSE].resetRanges(),
                     this.mode = i,
-                    this.emit(w.FlyingEnded, _, G, this.currentPano, H),
+                    this.emit(w.FlyingEnded, _, G, this.currentPano, H) 
+                    
+                    this.updateMarkerVisi(),//add
+                    (p === u.PANORAMA || i == u.PANORAMA) && this.updateHotVisible(),//add
+                    
                     
-                    this.updateMarkerVisi()//add
                     h && p !== u.PANORAMA && i === u.PANORAMA ? this.startWarp(b.Retain, E.Retain, x.BLACK, null, null, s) : (s && s(),
                     t.resolve())
                 }
@@ -26961,7 +27017,8 @@ window.Modernizr = function(n, e, t) {
         }
         ,
         n.prototype.detectMaxNavPanoSizeClass = function() {
-            return this.useHighResolutionPanos ? a.isMobile() ? r.STANDARD : $("#player").height() < this.highQualityThreshold ? r.STANDARD : r.HIGH : r.STANDARD
+            if(settings.mobileNavHigh)return r.HIGH  //改
+            else return this.useHighResolutionPanos ? a.isMobile() ? r.STANDARD : $("#player").height() < this.highQualityThreshold ? r.STANDARD : r.HIGH : r.STANDARD
         }
         ,
         n.prototype.detectMaxNavPanoSize = function() {

+ 4 - 4
js/myShow.js

@@ -62,8 +62,8 @@ var g_weixinObj = {
 var settings = {
     overlay:{
 		width:1, height:0.5, depth:0.02
-	} 
-    
-    
-    
+	}  
+}
+if(window.number == '725'||window.number == '724'){
+    settings.mobileNavHigh = true
 }