xzw il y a 4 ans
Parent
commit
1877b6e36d
4 fichiers modifiés avec 46 ajouts et 25 suppressions
  1. 16 4
      edit.html
  2. 15 10
      js/edit.js
  3. 12 9
      js/main_2020_edit.js
  4. 3 2
      js/main_2020_show.js

+ 16 - 4
edit.html

@@ -1063,6 +1063,18 @@
                                         </div>
                                     </div>
                                 </li>
+                                <li class="">
+                                    <div class="itemTitle">
+                                        <span>其他</span>
+                                    </div>
+                                    <ul>
+                                        <li>
+                                            <input name="noAction" class="editCheckbox" type="checkbox" value="noAction" id="noAction">
+                                            <label for="noAction"></label>
+                                            <label for="noAction">仅用于指示(不弹窗)</label>
+                                        </li>
+                                    </ul>
+                                </li>
                             </ul>
                         </div>
                         <div class="buttons tail">
@@ -1406,15 +1418,15 @@
     <script> 
          
         //本地:
-        var token ="eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsInJvbGUiOm51bGwsIm1hbmFnZXIiOm51bGwsImlkIjoxLCJ1c2VyTmFtZSI6ImFkbWluIiwiZXhwIjoxNTk3MTA5MDk0LCJpYXQiOjE1OTcwMjI2OTQsImp0aSI6ImY4YzI1MTcyLWM0NmUtNGNmYi04MjRhLWJkMmU2YWRmOWVjZSJ9.kUEmWOCJ0WONTkUI1vTToLePfzgbLiWwhU5nEWIsvlg"
-        var ceshi = 'http://47.107.252.54:8105';
+        /*var token ="eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsInJvbGUiOm51bGwsIm1hbmFnZXIiOm51bGwsImlkIjoxLCJ1c2VyTmFtZSI6ImFkbWluIiwiZXhwIjoxNTk3MTA5MDk0LCJpYXQiOjE1OTcwMjI2OTQsImp0aSI6ImY4YzI1MTcyLWM0NmUtNGNmYi04MjRhLWJkMmU2YWRmOWVjZSJ9.kUEmWOCJ0WONTkUI1vTToLePfzgbLiWwhU5nEWIsvlg"
+        var ceshi = 'http://47.107.252.54:8105';*/
          
         //大场景: 
-       /* var ceshi = 'http://47.107.252.54:8105';
+        var ceshi = 'http://47.107.252.54:8105';
         var token = window.localStorage.dcj_token 
         if (!token) {
            window.location.href = '../list/index.html'
-        }*/
+        } 
         
         /*
         //军史馆:

+ 15 - 10
js/edit.js

@@ -152,10 +152,11 @@ EditTools.prototype.saveAll = function () {
               y: dom.hotMesh.position.y,
               z: dom.hotMesh.position.z
             },
-            //quaternion : hot.isSprite ? hot.quaternion: dom.hotMesh.quaternion.toObject()  
+            //有的定制场景代码是旧的,只能使用rotation,所以不输出quaternion : 
             rotation : hot.isSprite ?  new THREE.Euler().setFromQuaternion(hot.quaternion).toObject() : dom.hotMesh.rotation.toObject() 
             , 
             isSprite :  hot.isSprite ? 1 : 0,
+            noAction : hot.noAction ? 1 : 0,
             infoAttribute: dom.infoAttribute 
              
         }
@@ -476,6 +477,7 @@ Hotpoint.prototype.init = function (n) {
         info.position && hot.mesh.position.copy(info.position)
         info.quaternion && hot.mesh.quaternion.copy(info.quaternion)
         hot.isSprite = info.isSprite
+        hot.noAction = info.noAction
     }   
     that.hotpointDetail.addClass("atRight");
     transformControls.detach() 
@@ -521,15 +523,15 @@ Hotpoint.prototype.editHot = function (target) {
     
     
   // 参数初始化
-  info.title = info.title || '';
-  info.content = info.content || '';
-  info.iframe = info.iframe || [];
-  info.model = info.model || [];
-  info.images = info.images || [];
-  info.video = info.video || [];
+    info.title = info.title || '';
+    info.content = info.content || '';
+    info.iframe = info.iframe || [];
+    info.model = info.model || [];
+    info.images = info.images || [];
+    info.video = info.video || [];
     info.isSprite = this.editSpot.isSprite
-  
-  
+    info.noAction = this.editSpot.noAction
+      
   
   
   
@@ -544,6 +546,7 @@ Hotpoint.prototype.editHot = function (target) {
     initStyle(player.model.hots[li_id])
     
     $("#isSprite")[0].checked = this.editSpot.isSprite 
+    $("#noAction")[0].checked = this.editSpot.noAction 
 
   var iframesHTML = info.iframe.map(function (iframe) {
     return this.inputList("请填写网页链接", iframe)
@@ -1070,7 +1073,9 @@ Hotpoint.prototype.saveHot = function () {
         }
         
     })
-
+    $("#noAction").on("change",function(e){
+        _this.editSpot.noAction = this.checked; 
+    })
 }
 
 

+ 12 - 9
js/main_2020_edit.js

@@ -13731,8 +13731,8 @@ function o(a, s, l) {
                 
                 try{//处理一下导览数据,旧的曾有导览数据是错误的,将它删除 
                     var newImages = [];
-                    data.model.images.forEach((tourImg)=>{tourImg.thumbnail_signed_src && newImages.push(tourImg)})
-                    data.model.images = newImages 
+                    t.model.images.forEach((tourImg)=>{tourImg.thumbnail_signed_src && newImages.push(tourImg)})
+                    t.model.images = newImages 
                 
                 }catch(e){console.log(e) }
                 
@@ -14820,7 +14820,7 @@ function o(a, s, l) {
             
             this.quaternion || (this.quaternion = new THREE.Quaternion().setFromEuler(this.rotation)) 
             this.isSprite = t.isSprite
-            
+            this.noAction = t.noAction
             this.link = t.link,
             this.model = i,
             this.size = t.size;
@@ -14964,6 +14964,8 @@ function o(a, s, l) {
         }
         ,
         n.prototype.examine = function(e, options) {
+            if(!player.currentPano)return;     
+             
             var i = document.getElementById("popup");
             options = options || {}
             if (this.link && !options.dontOpen) {
@@ -21115,9 +21117,9 @@ function o(a, s, l) {
                         VisiSet.SetOneTagVisible(this.intersectHot); //设置这个热点的可见性
                         return;
                     }
+                    this.intersectHot.noAction || this.intersectHot.examine(this)
+                    return !0
                     
-                    return this.intersectHot.examine(this),
-                    !0
                 }
             }
             ,
@@ -21192,10 +21194,11 @@ function o(a, s, l) {
                      
                 var o = n[0];
                 if ("hotSprite" == o.object.type){
-                    return this.intersectHot = o.object.belongHot,
-                    this.intersectHot.showTitle(),
-                    $(`.toolRight .spotList ul li[data-spid=${this.intersectHot.sid}]`).addClass("active"),
-                    void $("#player").css("cursor", "pointer"); 
+                    this.intersectHot = o.object.belongHot 
+                    this.intersectHot.showTitle() 
+                    $(`.toolRight .spotList ul li[data-spid=${this.intersectHot.sid}]`).addClass("active") 
+                    this.intersectHot.noAction ||   $("#player").css("cursor", "pointer"); 
+                    return; 
                 }
                 $(".toolRight .spotList ul li").removeClass("active")
                 this.intersectHot = null;

+ 3 - 2
js/main_2020_show.js

@@ -15384,6 +15384,7 @@ window.Modernizr = function(n, e, t) {
             }
             this.quaternion || (this.quaternion = new THREE.Quaternion().setFromEuler(this.rotation)) 
             this.isSprite = d.isSprite
+            this.noAction = d.noAction
             this.link = d.link;
 			this.model = model;
 			this.size = d.size;
@@ -22117,7 +22118,7 @@ window.Modernizr = function(n, e, t) {
 			n.prototype.checkHotClick = function() { 
 				if(this.intersectHot){
 					
-					this.intersectHot.examine(this);
+					this.intersectHot.noAction || this.intersectHot.examine(this);
 					
 					
 					
@@ -22222,7 +22223,7 @@ window.Modernizr = function(n, e, t) {
 				if(o.object.type == "hotSprite"){ //add
 					this.intersectHot =  o.object.belongHot; 
                     this.intersectHot.showTitle() 
-					$("#player").css("cursor","pointer");
+					this.intersectHot.noAction || $("#player").css("cursor","pointer");
 					return;
 				}