Преглед изворни кода

形象动画与自动导览联调

aamin пре 2 година
родитељ
комит
2391109c72

+ 3 - 2
scene/public/static/css/main.css

@@ -4466,7 +4466,7 @@ a.tag-link {
 
 #gui #drawer.playing,
 #gui .pinBottom.playing {
-    bottom: 20px
+    /* bottom: 20px */
 }
 
 #thumb-container .thumbImg {
@@ -4645,7 +4645,8 @@ a.tag-link {
     transition-property: bottom;
     transition-duration: .5s;
     background-color: #000;
-    z-index: 50
+    z-index: 50;
+    display: none !important;
 }
 
 #playHead.playing {

+ 10 - 0
scene/public/static/js/main_2020_show.js

@@ -4853,6 +4853,9 @@ window.Modernizr = function(n, e, t) {
             }
             ,
             n.prototype.playTour = function() {
+                // alert('开始导航')
+                // 触发形象talk状态
+                window.parent.window.handleRobot('talk');
                 if (!this.bounceable())
                     return this.tourIsPlaying ? void A.info("tour is already playing") 
                     : void (
@@ -4882,6 +4885,9 @@ window.Modernizr = function(n, e, t) {
 			} */
 			 
             n.prototype.stopTour = function(isAutoStop) {//停止导览        isAutoStop 希望仅在飞完结束自动停止时的stopTour不停止tourSound, 这样才能完整播放tourSound.  不过似乎会在倒数第二个片段点击按钮停止导览时也视作自动结束的(执行this.interrupt() )。
+                // alert('停止导航')
+                // 回到idle状态
+                window.parent.window.handleRobot('idle');
                 SoundManager.pause('tour'), // 周恩光 自动导览暂停时同时停止语音
                 this.isInterrupted() || this.transitionStage === y.Moving && this.checkAndHandleWalkingtourInterruption(this.nextWarpStyle) || (this.tourIsPlaying && (this.player.zoomEnabled = this.wasZoomEnabled),
                 this.tourIsPlaying = !1, 
@@ -6287,6 +6293,10 @@ window.Modernizr = function(n, e, t) {
             }
             function a() {
                 // window.parent.handleRobot('greeting'),
+                // alert('打开列表')
+                $("#drawer").hasClass("open") ? alert('关闭列表'): alert('打开列表')
+                window.parent.window.handleTopRobot('top')
+                // $("#drawer").hasClass("open") ? function(){window.parent && window.parent.window.handleTopRobot ? window.parent.window.handleTopRobot('bottom'):''}: function(){ window.parent && window.parent.window.handleTopRobot ? window.parent.window.handleTopRobot('top'):''}
                 c(),
                 $(".pinBottom").toggleClass("open"),
                 $("#drawer").toggleClass("open"),

+ 19 - 9
scene/src/views/gui/menu.vue

@@ -75,12 +75,12 @@
               <img class="active icon icon-inside active" :src="require('@/assets/images/icon/floor_active.png')" />
               <div class="btmText">顶部俯视</div>
             </div>
-            <div class="toHomeBox" style="margin-right: '10px'; width: 60px;float: left;">
+            <div class="toHomeBox" style="margin-right: '10px';float: left;">
               <img style="display: block;" src="../../assets/img/game.png" @click="openGameBox()"
                 alt="" />
               <div class="btmText">互动游戏</div>
             </div>
-            <div id="volume" class="toHomeBox" style="margin-right: '10px';width: 60px;float: left;">
+            <div id="volume" class="toHomeBox toHomeBox2" style="margin-right: '10px';float: left; ">
               <img id="openMusic" style="display: block;" @click="switchBGM(true)" src="../../assets/img/musicAc.png"
                 alt="" />
               <img id="closeMusic" style="display: none;" @click="switchBGM(false)" src="../../assets/img/music.png"
@@ -248,16 +248,16 @@ export default {
       if (window.hotData) {
         clearInterval(timeA);
         window.parent.window.handleRobot('greeting');
-        setTimeout(() => {
-          window.parent.window.handleTopRobot('top');
-        }, 2000);
+        // setTimeout(() => {
+        //   window.parent.window.handleTopRobot('top');
+        // }, 2000);
       }
 
     }, 500);
-    setTimeout(() => {
-      window.parent.window.handleTopRobot('bottom');
-      console.log('形象下移触发')
-    }, 6000)
+    // setTimeout(() => {
+    //   window.parent.window.handleTopRobot('bottom');
+    //   console.log('形象下移触发')
+    // }, 6000)
 
   },
   methods: {
@@ -541,12 +541,16 @@ export default {
 }
 
 .toHomeBox {
+  width: 60px;
   margin-right: 40px;
   cursor: pointer;
   position: relative;
   // width: 44px;
   display: flex;
   justify-content: center;
+  @media screen and (max-width: 700px) {
+    width: 50px;
+  }
 
   img {
     width: @wh;
@@ -560,6 +564,12 @@ export default {
   }
 }
 
+.toHomeBox2{
+  @media screen and (max-width: 700px) {
+    margin: 10px 0;
+  }
+}
+
 .pinBottom-container {
   #myHotList {
     position: relative;

Разлика између датотеке није приказан због своје велике величине
+ 1 - 0
zhengquan/public/scene/css/app.27ab14d3.css


Разлика између датотеке није приказан због своје велике величине
+ 1 - 0
zhengquan/public/scene/css/app.a996bc07.css


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
zhengquan/public/scene/index.html


Разлика између датотеке није приказан због своје велике величине
+ 1 - 0
zhengquan/public/scene/js/app.87935e31.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 0
zhengquan/public/scene/js/app.9137e22d.js


+ 3 - 2
zhengquan/public/scene/static/css/main.css

@@ -4466,7 +4466,7 @@ a.tag-link {
 
 #gui #drawer.playing,
 #gui .pinBottom.playing {
-    bottom: 20px
+    /* bottom: 20px */
 }
 
 #thumb-container .thumbImg {
@@ -4645,7 +4645,8 @@ a.tag-link {
     transition-property: bottom;
     transition-duration: .5s;
     background-color: #000;
-    z-index: 50
+    z-index: 50;
+    display: none !important;
 }
 
 #playHead.playing {

+ 10 - 0
zhengquan/public/scene/static/js/main_2020_show.js

@@ -4853,6 +4853,9 @@ window.Modernizr = function(n, e, t) {
             }
             ,
             n.prototype.playTour = function() {
+                // alert('开始导航')
+                // 触发形象talk状态
+                window.parent.window.handleRobot('talk');
                 if (!this.bounceable())
                     return this.tourIsPlaying ? void A.info("tour is already playing") 
                     : void (
@@ -4882,6 +4885,9 @@ window.Modernizr = function(n, e, t) {
 			} */
 			 
             n.prototype.stopTour = function(isAutoStop) {//停止导览        isAutoStop 希望仅在飞完结束自动停止时的stopTour不停止tourSound, 这样才能完整播放tourSound.  不过似乎会在倒数第二个片段点击按钮停止导览时也视作自动结束的(执行this.interrupt() )。
+                // alert('停止导航')
+                // 回到idle状态
+                window.parent.window.handleRobot('idle');
                 SoundManager.pause('tour'), // 周恩光 自动导览暂停时同时停止语音
                 this.isInterrupted() || this.transitionStage === y.Moving && this.checkAndHandleWalkingtourInterruption(this.nextWarpStyle) || (this.tourIsPlaying && (this.player.zoomEnabled = this.wasZoomEnabled),
                 this.tourIsPlaying = !1, 
@@ -6287,6 +6293,10 @@ window.Modernizr = function(n, e, t) {
             }
             function a() {
                 // window.parent.handleRobot('greeting'),
+                // alert('打开列表')
+                // $("#drawer").hasClass("open") ? alert('关闭列表'): alert('打开列表')
+                // window.parent.window.handleTopRobot('top')
+                $("#drawer").hasClass("open") ? window.parent && window.parent.window.handleTopRobot ? window.parent.window.handleTopRobot('bottom'):'': window.parent && window.parent.window.handleTopRobot ? window.parent.window.handleTopRobot('top'):''
                 c(),
                 $(".pinBottom").toggleClass("open"),
                 $("#drawer").toggleClass("open"),

BIN
zhengquan/public/staticData/animation/1/idle.png


BIN
zhengquan/public/staticData/animation/1/talk.png


Разлика између датотеке није приказан због своје велике величине
+ 2 - 1
zhengquan/public/staticData/data.js


+ 6 - 4
zhengquan/src/views/Scene/ScenePage.vue

@@ -143,8 +143,8 @@ onMounted(() => {
   // 机器人在上面  top:上  bottom:下
   // @ts-ignore
   window.handleTopRobot = (state: string) => {
-    // const xuliezhenDom = document.getElementById('xuliezhenid')
-    // state == 'top' ? !browser.mobile ? xuliezhenDom!.style.bottom = '200px' : xuliezhenDom!.style.bottom = '120px' : !browser.mobile ? xuliezhenDom!.style.bottom = '100px' : xuliezhenDom!.style.bottom = '10px'
+    const xuliezhenDom = document.getElementById('xuliezhenid')
+    state == 'top' ? !browser.mobile ? xuliezhenDom!.style.bottom = '120px' : xuliezhenDom!.style.bottom = '120px' : !browser.mobile ? xuliezhenDom!.style.bottom = '0px' : xuliezhenDom!.style.bottom = '10px'
   }
 
   // 机器人隐藏与显示(热点打开时隐藏)
@@ -189,9 +189,9 @@ onMounted(() => {
         </div>
       </div>
     </div>
-    <div class="xingxiangBox" v-show="isShowFigure">
+    <div id="xuliezhenid" class="xingxiangBox" v-show="isShowFigure">
       <!-- 形象人 -->
-      <div id="xuliezhenid" class="xuliezhen" v-if="isReady" @click="xingxiangListShow = true"
+      <div class="xuliezhen" v-if="isReady" @click="xingxiangListShow = true"
         :style="{ backgroundImage: `url(${baseUrl}/animation/${currentUnit.id}/${animalStat}.png)`, backgroundSize: 'cover' }">
       </div>
       <!-- 积分牌 -->
@@ -366,6 +366,8 @@ onMounted(() => {
     position: absolute;
     right: 1%;
     bottom: 0;
+    transition-property: bottom;
+    transition-duration: .5s;
 
     .xuliezhen {
       position: absolute;