tremble vor 3 Jahren
Ursprung
Commit
ada3f60577

Datei-Diff unterdrückt, da er zu groß ist
+ 36 - 17
web/public/static/js/main_2020_show.js


+ 1 - 1
web/public/static/js/manage.js

@@ -1,9 +1,9 @@
   
 var g_ProjectName=window.location.pathname.substring(window.location.pathname.indexOf("/")+1,window.location.pathname.lastIndexOf("/"));
-// var g_Prefix="http://192.168.0.245:8003/";
 
 var g_Prefix=window.location.origin+'/';
 window.isLocal = true
+// var g_Prefix="http://192.168.0.245:8003/";
 
 var g_index=null;
 var g_modeldata=null;

BIN
web/src/assets/audio/open.mp3


+ 3 - 0
web/src/components/exhibition/index.vue

@@ -117,6 +117,9 @@ export default {
         this.shensuo = !this.shensuo;
         return;
       }
+      if (item.name == this.current.name) {
+        return
+      }
       this.current = item;
       this.$bus.$emit("currentScene", item);
     },

+ 4 - 4
web/src/pages/index.js

@@ -7,10 +7,10 @@ import 'viewerjs/dist/viewer.css'
 import Viewer from 'v-viewer'
 Vue.use(Viewer,{
   defaultOptions: {
-    navbar:false,
-    button:false,
-    maxZoomRatio:2,
-    zIndex:1000000
+    navbar: false,
+    button: false,
+    maxZoomRatio: 2,
+    zIndex: 1000000
   }
 })
 

+ 1 - 0
web/src/views/scene/index.vue

@@ -68,6 +68,7 @@ export default {
         if (Object.prototype.toString.call(res.data) == "[object Object]") {
           let data = res.data.data;
           if (res.data.source === "currentScene") {
+            this.view = ''
             if (data.pano) {
               let {x,y,z,w} = data.quat
               this.view = `&firstView=pano:${data.pano},qua:${x+', '+y+', '+z+', '+w}`

+ 53 - 14
web/src/views/scene/scene.vue

@@ -81,9 +81,10 @@
     />
     <vpopup @close="handlepopClose" :cp="cp" v-if="cp" />
 
-    <div class="jieshuo" v-show="isjieshuo">
-      <img :src="require(`@/assets/images/jieshuo/${isSpeak?'junren_speaking':'junren_stand2'}.png`)" alt="">
+    <div class="jieshuo" :class="{jieshuoActive:istran,middlepos:isStartScene,jieshuospk:isSpeak}" v-show="isjieshuo">
+      <img :src="require(`@/assets/images/jieshuo/${isSpeak?'junren_speaking':'junren_standlook'}.png`)" alt="">
     </div>
+    <div class="jieshuomask" v-if="!istran&&isStartScene"></div>
   </div>
 </template>
 
@@ -128,6 +129,9 @@ export default {
   },
 
   mounted() {
+
+   
+   
     window.addEventListener("message", (res) => {
       if (Object.prototype.toString.call(res.data) == "[object Object]") {
         if (res.data.source === "changeTheme") {
@@ -135,7 +139,7 @@ export default {
         }
 
         if (res.data.source === "bofangbgm") {
-          this.$bus.$emit("changeBGM",true);
+            this.$bus.$emit("changeBGM",true);
         }
 
         if (res.data.source === "userInfo") {
@@ -169,6 +173,21 @@ export default {
             },
             "*"
           );
+
+        window.player.director.on('jieshao',()=>{
+        
+              this.isStartScene = true
+            let auctx = new Audio()
+            auctx.src = require('@/assets/audio/open.mp3')
+            auctx.play()
+            this.isSpeak = true
+            auctx.addEventListener('ended',()=>{
+              this.istran = true
+              this.isSpeak = false
+              window.startAndPlay()
+            })
+        });
+
         
         window.player.director.on("linkother", data => {
           window.parent.postMessage(
@@ -276,9 +295,11 @@ export default {
   },
   data() {
     return {
+      istran: false,
       isSpeak:false,
       isjieshuo:true,
       showExhi:false,
+      isStartScene:false,
       quotes: [
         "很漂亮的线上展馆,支持!",
         "足不出户就能浏览参观,太棒了!",
@@ -351,19 +372,25 @@ export default {
 @single:500px;
 @scale:0.7;
 
+.jieshuomask{
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  background: rgba(0, 0, 0, 0.5);
+  z-index: 990;
+}
 
 .jieshuo{
   position: fixed;
-  bottom: 0;
-  right: 0;
   z-index: 999;
   width: @single * @scale;
   height: @single* @scale;
   overflow: hidden;
   pointer-events: none;
-  // animation: trantobr 2.4s 1.2s forwards;
-
-
+  bottom: 0;
+  right: 0;
   >img{
     width: @full * @scale;
     left: 0;
@@ -373,6 +400,22 @@ export default {
   }
 }
 
+.jieshuospk{
+  >img{
+    animation: jieshuo 3.4s steps(53) infinite;
+  }
+}
+.middlepos{
+  bottom: calc(50% - 200px);
+  right: calc(50% - 250px);
+}
+
+.jieshuoActive{
+  animation: trantobr 1.4s linear forwards;
+}
+
+
+
 @keyframes jieshuo {
   100% {
     left: -@full* @scale;
@@ -381,17 +424,13 @@ export default {
 
 @keyframes trantobr {
   0% {
-    top: 50%;
-    left: 50%;
-    transform: translate(-50%,-50%);
+    bottom: calc(50% - 200px);
+    right: calc(50% - 250px);
   }
 
   100% {
-    top: unset;
-    left: unset;
     bottom: 0;
     right: 0;
-    transform: translate(0);
   }
 }
 </style>