Przeglądaj źródła

添加厂房中心点

wukai 5 miesięcy temu
rodzic
commit
7ae03ece11
2 zmienionych plików z 16 dodań i 11 usunięć
  1. 2 2
      css/main.css
  2. 14 9
      main.html

+ 2 - 2
css/main.css

@@ -110,7 +110,7 @@
     #imp_item{
         position: absolute;
         width: 160px;
-        height: 350px;
+        height: 450px;
         background: rgba(19, 47, 95, 0.8);
         box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.2);
         border-radius: 2px 2px 2px 2px;
@@ -142,7 +142,7 @@
         width: 1920px;
         height: 95px;
         z-index: 1;
-        background: #ffffff00;        
+        background: #ffffff00;
     }
 
     .top02{

+ 14 - 9
main.html

@@ -9,12 +9,12 @@
 <body onclick="$('#imp_item,#date_select,#day_select').hide();$('#search_result').html('').hide();$('#search input').val('')">
 <div id="loading_a1"></div>
 <div id="loading">正在加载模型中...</div>
-<div for="FAC" id="top" class="top topfac">    
+<div for="FAC" id="top" class="top topfac">
     <div title="返回主视图"
          style="cursor: pointer;position: absolute;right: 10px;top: 25px;height: 38px;width: 38px;text-align: center;"
          onclick="backMasterView()"><img src="image/view.png"></div>
 </div>
-<div for="IN03" id="top" class="top top03 hideDiv">    
+<div for="IN03" id="top" class="top top03 hideDiv">
     <div title="返回主视图"
          style="cursor: pointer;position: absolute;right: 10px;top: 25px;height: 38px;width: 38px;text-align: center;"
          onclick="backMasterView()"><img src="image/view.png"></div>
@@ -2792,7 +2792,7 @@
         })
     }
 
-    function backMasterView() {    
+    function backMasterView() {
         zoomCount=0;
         switch(currentTargetType){
             case "FAC":
@@ -2817,8 +2817,13 @@
             } catch (e) {
             }
         }
-        player.Native.Camera.goHome(1)
         player.Native.Camera.moveTo([235.678127000173, 13.38107286701451, 74.13573809425804], [-1248.3191825020908, -262.59031050373517, -409.93944372657353], [-0.30023176822741604, -0.055832565112502126, 0.9522308596238611], 1);
+        // 使用异步函数
+        (async () => {
+            setTimeout(function() {
+                player.Native.Camera.setAnchorPos([-24.12020492553711,7.372551441192627,32.57069396972656]);
+            }, 3000);
+        })();
     }
 
     //2号楼内部最佳视图
@@ -2842,12 +2847,12 @@
                 player.Native.CameraAnimation.stop();
             } catch (e) {
             }
-        } 
+        }
         player.Native.Camera.moveTo([59.56050392473782, -16.715593393512307, 33.88405960390085], [-225.90035917394823, 266.6367338252189, -87.93132661854877], [-0.2057201109308161, 0.20420057431057317, 0.9570691518431909], 1);
         // 使用异步函数
         (async () => {
             setTimeout(function() {
-                player.Native.Camera.setAnchorPos([-127.20165252685547, 43.73373031616211,11.815496444702148]);
+                player.Native.Camera.setAnchorPos([-80.51578521728516,45.08513259887695,11.685993194580078]);
             }, 3000);
         })();
     }
@@ -2942,7 +2947,7 @@
             var cf = "data://models/T_03.pr";
             var errStr = await PlayerUtils.call(Native.Model.loadModel, currentTargetType, cf);
             modelLoadState[currentTargetType] = true;
-        }        
+        }
         await player.Native.Model.setModelVisible(currentTargetType,true);
         player.Native.CameraAnimation.clearKeyFrame();
     }
@@ -3050,7 +3055,7 @@
         loadFacModel(Native);
         setTimeout(function(){
              if (document.getElementById("loading") != null) document.getElementById("loading").remove(true) //加载完成,移除Loading
-            if (document.getElementById("loading_a1") != null) document.getElementById("loading_a1").remove(true)           
+            if (document.getElementById("loading_a1") != null) document.getElementById("loading_a1").remove(true)
         },4000);
 
         //调整视角,使其达到最佳初始效果
@@ -3108,7 +3113,7 @@
                         default:
                             break;
                     }
-                    backMasterView();               
+                    backMasterView();
                 }else{
                     moveFacAnything("LClick", event);
                 }