|
@@ -145,11 +145,28 @@
|
|
|
</transition>
|
|
</transition>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
|
|
+ <!-- 自动导览 -->
|
|
|
|
|
+ <transition name="fade" enter-active-class="animate__animated animate__fadeInUp animate__faster" leave-active-class="animate__animated animate__fadeOutDown animate__faster">
|
|
|
|
|
+ <Guide v-if="showGuide" :tourList="tourList" />
|
|
|
|
|
+ </transition>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 导览底部进度 -->
|
|
|
|
|
+
|
|
|
|
|
+ <div class="guide-progress" v-if="!showGuide && guideIsPlay">
|
|
|
|
|
+ <div class="progress-box">
|
|
|
|
|
+ <div class="info">
|
|
|
|
|
+ <span>{{ 1 }}</span
|
|
|
|
|
+ >of<span>{{ tourList.length }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="bar-box"><div :style="`width:${100 / tourList.length}%;left:${(activeIndex * 100) / tourList.length}%;`" class="current-box"></div></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
<!-- 小地图控制按钮 -->
|
|
<!-- 小地图控制按钮 -->
|
|
|
<div class="minimap-controls" :class="{ open: !miniMapStatus, mobile: isMobile }" @click="toggleMiniMap"></div>
|
|
<div class="minimap-controls" :class="{ open: !miniMapStatus, mobile: isMobile }" @click="toggleMiniMap"></div>
|
|
|
<template v-if="!isMobile">
|
|
<template v-if="!isMobile">
|
|
|
<transition name="fade" enter-active-class="animate__animated animate__fadeInUp animate__faster" leave-active-class="animate__animated animate__fadeOutDown animate__faster">
|
|
<transition name="fade" enter-active-class="animate__animated animate__fadeInUp animate__faster" leave-active-class="animate__animated animate__fadeOutDown animate__faster">
|
|
|
- <div v-show="openType != 'immersive'" class="left-btn">
|
|
|
|
|
|
|
+ <div v-show="openType != 'immersive' && !showGuide" class="left-btn" :class="{}">
|
|
|
<div class="button-item" :class="getActive(i.type)" v-if="i.type == 'model' || mode == 'panorama'" v-for="(i, index) in leftButtons" @click.stop="hanlderButtons(i, i.type)">
|
|
<div class="button-item" :class="getActive(i.type)" v-if="i.type == 'model' || mode == 'panorama'" v-for="(i, index) in leftButtons" @click.stop="hanlderButtons(i, i.type)">
|
|
|
<img class="normal" :src="i.normalIcon" alt="" />
|
|
<img class="normal" :src="i.normalIcon" alt="" />
|
|
|
<img class="active" :src="i.activeIcon" alt="" />
|
|
<img class="active" :src="i.activeIcon" alt="" />
|
|
@@ -157,6 +174,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</transition>
|
|
</transition>
|
|
|
|
|
+ <!-- 沉浸式看展按钮 -->
|
|
|
|
|
|
|
|
<div class="kanzhan-btns">
|
|
<div class="kanzhan-btns">
|
|
|
<transition name="preScene">
|
|
<transition name="preScene">
|
|
@@ -207,7 +225,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
<!-- 音乐按钮 -->
|
|
<!-- 音乐按钮 -->
|
|
|
<transition name="fade" enter-active-class="animate__animated animate__fadeInUp animate__faster" leave-active-class="animate__animated animate__fadeOutDown animate__faster">
|
|
<transition name="fade" enter-active-class="animate__animated animate__fadeInUp animate__faster" leave-active-class="animate__animated animate__fadeOutDown animate__faster">
|
|
|
- <div class="right-btn" :class="{ mobile: isMobile }">
|
|
|
|
|
|
|
+ <div v-show="!showGuide" class="right-btn" :class="{ mobile: isMobile }">
|
|
|
<div id="bgm" class="button-item" :class="getActive(i.type)" v-for="(i, index) in rightButtons">
|
|
<div id="bgm" class="button-item" :class="getActive(i.type)" v-for="(i, index) in rightButtons">
|
|
|
<img class="normal" id="openMusic" :src="i.normalIcon" alt="" @click="switchBGM(false)" />
|
|
<img class="normal" id="openMusic" :src="i.normalIcon" alt="" @click="switchBGM(false)" />
|
|
|
<img class="active" id="closeMusic" :src="i.activeIcon" alt="" @click="switchBGM(true)" />
|
|
<img class="active" id="closeMusic" :src="i.activeIcon" alt="" @click="switchBGM(true)" />
|
|
@@ -227,13 +245,14 @@
|
|
|
<script>
|
|
<script>
|
|
|
import HotList from "./components/hotList.vue";
|
|
import HotList from "./components/hotList.vue";
|
|
|
import TourList from "./components/tourList.vue";
|
|
import TourList from "./components/tourList.vue";
|
|
|
|
|
+import Guide from "./components/guide.vue";
|
|
|
import LayerMap from "./components/layerMap.vue";
|
|
import LayerMap from "./components/layerMap.vue";
|
|
|
import Share from "./components/share.vue";
|
|
import Share from "./components/share.vue";
|
|
|
import { directive } from "vue-awesome-swiper";
|
|
import { directive } from "vue-awesome-swiper";
|
|
|
import "swiper/css/swiper.css";
|
|
import "swiper/css/swiper.css";
|
|
|
import { mapGetters, mapMutations } from "vuex";
|
|
import { mapGetters, mapMutations } from "vuex";
|
|
|
export default {
|
|
export default {
|
|
|
- components: { HotList, TourList, LayerMap, Share },
|
|
|
|
|
|
|
+ components: { HotList, TourList, LayerMap, Guide, Share },
|
|
|
directives: {
|
|
directives: {
|
|
|
swiper: directive,
|
|
swiper: directive,
|
|
|
},
|
|
},
|
|
@@ -242,6 +261,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ loaded: false,
|
|
|
miniMapStatus: true,
|
|
miniMapStatus: true,
|
|
|
isRoute: true,
|
|
isRoute: true,
|
|
|
mode: "panorama",
|
|
mode: "panorama",
|
|
@@ -295,6 +315,12 @@ export default {
|
|
|
name: "沉浸看展",
|
|
name: "沉浸看展",
|
|
|
type: "immersive",
|
|
type: "immersive",
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ normalIcon: require("@/assets/image/icon/new-icon/icon_play.svg"),
|
|
|
|
|
+ activeIcon: require("@/assets/image/icon/new-icon/icon_play.svg"),
|
|
|
|
|
+ name: "自动导览",
|
|
|
|
|
+ type: "guide",
|
|
|
|
|
+ },
|
|
|
],
|
|
],
|
|
|
rightButtons: [
|
|
rightButtons: [
|
|
|
{
|
|
{
|
|
@@ -362,6 +388,8 @@ export default {
|
|
|
computed: {
|
|
computed: {
|
|
|
...mapGetters({
|
|
...mapGetters({
|
|
|
points: "points",
|
|
points: "points",
|
|
|
|
|
+ showGuide: "showGuide",
|
|
|
|
|
+ guideIsPlay: "guideIsPlay",
|
|
|
}),
|
|
}),
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
@@ -377,6 +405,7 @@ export default {
|
|
|
// console.error(window.bus)
|
|
// console.error(window.bus)
|
|
|
// }, 100);
|
|
// }, 100);
|
|
|
window.addEventListener("playerAndModelReady", () => {
|
|
window.addEventListener("playerAndModelReady", () => {
|
|
|
|
|
+ this.loaded = true;
|
|
|
player.on("flying.ended", () => {
|
|
player.on("flying.ended", () => {
|
|
|
this.mode = player.mode;
|
|
this.mode = player.mode;
|
|
|
if (this.mode == "dollhouse") {
|
|
if (this.mode == "dollhouse") {
|
|
@@ -434,6 +463,16 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
switch (item.type) {
|
|
switch (item.type) {
|
|
|
|
|
+ case "guide":
|
|
|
|
|
+ if (this.guideIsPlay) {
|
|
|
|
|
+ this.setData({ guideIsPlay: false });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.setData({ showGuide: true, guideIsPlay: true });
|
|
|
|
|
+ if (!this.tourList.length) {
|
|
|
|
|
+ this.tourList = window.player ? player?.model?.heroLocations2 : [];
|
|
|
|
|
+ }
|
|
|
|
|
+ break;
|
|
|
case "model":
|
|
case "model":
|
|
|
if (player.mode == "dollhouse") {
|
|
if (player.mode == "dollhouse") {
|
|
|
player.FlyToMode("panorama");
|
|
player.FlyToMode("panorama");
|
|
@@ -597,6 +636,7 @@ export default {
|
|
|
color: #edd3b0;
|
|
color: #edd3b0;
|
|
|
outline: none;
|
|
outline: none;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
// 鼠标移入显示的文字和图片
|
|
// 鼠标移入显示的文字和图片
|
|
|
#gui-modes-inside {
|
|
#gui-modes-inside {
|
|
|
position: relative;
|
|
position: relative;
|
|
@@ -766,6 +806,57 @@ export default {
|
|
|
.viewContainer {
|
|
.viewContainer {
|
|
|
padding: 10px 20px 0 34px;
|
|
padding: 10px 20px 0 34px;
|
|
|
}
|
|
}
|
|
|
|
|
+.guide-progress {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 12px;
|
|
|
|
|
+ background: rgba(55, 54, 53, 0.6);
|
|
|
|
|
+ border-radius: 5px 5px 5px 5px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
|
+ padding: 0 20px;
|
|
|
|
|
+ .progress-box {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ // margin-top: 7px;
|
|
|
|
|
+
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
|
+ .info {
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ transform: scale(0.8);
|
|
|
|
|
+ span {
|
|
|
|
|
+ &:nth-of-type(1) {
|
|
|
|
|
+ margin-right: 3px;
|
|
|
|
|
+ }
|
|
|
|
|
+ &:nth-of-type(2) {
|
|
|
|
|
+ margin-left: 3px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .bar-box {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ height: 5px;
|
|
|
|
|
+ background: rgba(0, 0, 0, 0.46);
|
|
|
|
|
+ border-radius: 50px 50px 50px 50px;
|
|
|
|
|
+ margin-left: 16px;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ .current-box {
|
|
|
|
|
+ // width: 66px;
|
|
|
|
|
+ height: 3px;
|
|
|
|
|
+ background: #a88959;
|
|
|
|
|
+ border-radius: 10px 10px 10px 10px;
|
|
|
|
|
+ opacity: 0.5;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 0%;
|
|
|
|
|
+ top: 50%;
|
|
|
|
|
+ transform: translateY(-50%);
|
|
|
|
|
+ transition: left 0.3s;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
@iconW: 56px;
|
|
@iconW: 56px;
|
|
|
@icomarginRight: 25px;
|
|
@icomarginRight: 25px;
|
|
|
.minimap-controls {
|
|
.minimap-controls {
|
|
@@ -864,6 +955,11 @@ export default {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
left: 44px;
|
|
left: 44px;
|
|
|
bottom: 40px;
|
|
bottom: 40px;
|
|
|
|
|
+ transition: bottom 0.3s;
|
|
|
|
|
+ &.hide {
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.button-item {
|
|
.button-item {
|
|
|
width: @iconW;
|
|
width: @iconW;
|
|
|
height: @iconW;
|
|
height: @iconW;
|
|
@@ -916,6 +1012,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.right-btn {
|
|
.right-btn {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
@@ -923,9 +1020,13 @@ export default {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
right: 44px;
|
|
right: 44px;
|
|
|
bottom: 40px;
|
|
bottom: 40px;
|
|
|
|
|
+ &.hide {
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.button-item {
|
|
.button-item {
|
|
|
- width: @iconW;
|
|
|
|
|
- height: @iconW;
|
|
|
|
|
|
|
+ // width: @iconW;
|
|
|
|
|
+ // height: @iconW;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
@@ -934,6 +1035,8 @@ export default {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
img {
|
|
img {
|
|
|
display: none;
|
|
display: none;
|
|
|
|
|
+ width: @iconW;
|
|
|
|
|
+ height: @iconW;
|
|
|
}
|
|
}
|
|
|
.tip-box {
|
|
.tip-box {
|
|
|
display: none;
|
|
display: none;
|