|
@@ -152,6 +152,59 @@
|
|
class="camera-content"
|
|
class="camera-content"
|
|
@close="showingContentIdx = 0"
|
|
@close="showingContentIdx = 0"
|
|
/>
|
|
/>
|
|
|
|
+
|
|
|
|
+ <transition name="fade-in-out-slow">
|
|
|
|
+ <video
|
|
|
|
+ v-show="isShowEffectVideo1"
|
|
|
|
+ ref="sceneChangeEffectVideo1"
|
|
|
|
+ class="sceneChangeEffectVideo"
|
|
|
|
+ load="lazy"
|
|
|
|
+ src="@/assets/videos/scene-change-effect-1.mp4"
|
|
|
|
+ playsinline
|
|
|
|
+ webkit-playsinline="true"
|
|
|
|
+ x5-video-player-type="h5"
|
|
|
|
+ @ended="onEffectVideoEnd"
|
|
|
|
+ />
|
|
|
|
+ </transition>
|
|
|
|
+ <transition name="fade-in-out-slow">
|
|
|
|
+ <video
|
|
|
|
+ v-show="isShowEffectVideo2"
|
|
|
|
+ ref="sceneChangeEffectVideo2"
|
|
|
|
+ class="sceneChangeEffectVideo"
|
|
|
|
+ src="@/assets/videos/scene-change-effect-2.mp4"
|
|
|
|
+ playsinline
|
|
|
|
+ webkit-playsinline="true"
|
|
|
|
+ x5-video-player-type="h5"
|
|
|
|
+ @ended="onEffectVideoEnd"
|
|
|
|
+ />
|
|
|
|
+ </transition>
|
|
|
|
+ <transition name="cloud-top">
|
|
|
|
+ <img
|
|
|
|
+ v-if="isShowEffectCloud"
|
|
|
|
+ class="cloud cloud-top"
|
|
|
|
+ src="@/assets/images/cloud-top.png"
|
|
|
|
+ alt=""
|
|
|
|
+ draggable="false"
|
|
|
|
+ >
|
|
|
|
+ </transition>
|
|
|
|
+ <transition name="cloud-left-bottom">
|
|
|
|
+ <img
|
|
|
|
+ v-if="isShowEffectCloud"
|
|
|
|
+ class="cloud-left-bottom"
|
|
|
|
+ src="@/assets/images/cloud-left-bottom.png"
|
|
|
|
+ alt=""
|
|
|
|
+ draggable="false"
|
|
|
|
+ >
|
|
|
|
+ </transition>
|
|
|
|
+ <transition name="cloud-right-bottom">
|
|
|
|
+ <img
|
|
|
|
+ v-if="isShowEffectCloud"
|
|
|
|
+ class="cloud-right-bottom"
|
|
|
|
+ src="@/assets/images/cloud-right-bottom.png"
|
|
|
|
+ alt=""
|
|
|
|
+ draggable="false"
|
|
|
|
+ >
|
|
|
|
+ </transition>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -211,15 +264,30 @@ const btnOnTrack3Name = computed(() => {
|
|
return currentCameraList.value[cameraIdx.value].contentPageBtnNameList[2]
|
|
return currentCameraList.value[cameraIdx.value].contentPageBtnNameList[2]
|
|
})
|
|
})
|
|
|
|
|
|
-const CameraContent1 = defineAsyncComponent(() =>
|
|
|
|
|
|
+let CameraContent1 = defineAsyncComponent(() =>
|
|
import(`@/components/CameraContent-${Number(route.query.sceneIdx) + 1}-${Number(route.query.cameraIdx) + 1}-1.vue`)
|
|
import(`@/components/CameraContent-${Number(route.query.sceneIdx) + 1}-${Number(route.query.cameraIdx) + 1}-1.vue`)
|
|
)
|
|
)
|
|
-const CameraContent2 = defineAsyncComponent(() =>
|
|
|
|
|
|
+let CameraContent2 = defineAsyncComponent(() =>
|
|
import(`@/components/CameraContent-${Number(route.query.sceneIdx) + 1}-${Number(route.query.cameraIdx) + 1}-2.vue`)
|
|
import(`@/components/CameraContent-${Number(route.query.sceneIdx) + 1}-${Number(route.query.cameraIdx) + 1}-2.vue`)
|
|
)
|
|
)
|
|
-const CameraContent3 = defineAsyncComponent(() =>
|
|
|
|
|
|
+let CameraContent3 = defineAsyncComponent(() =>
|
|
import(`@/components/CameraContent-${Number(route.query.sceneIdx) + 1}-${Number(route.query.cameraIdx) + 1}-3.vue`)
|
|
import(`@/components/CameraContent-${Number(route.query.sceneIdx) + 1}-${Number(route.query.cameraIdx) + 1}-3.vue`)
|
|
)
|
|
)
|
|
|
|
+onBeforeRouteUpdate((to, from) => {
|
|
|
|
+ console.log('to: ', to)
|
|
|
|
+ if (to.name === route.name) {
|
|
|
|
+ CameraContent1 = defineAsyncComponent(() =>
|
|
|
|
+ import(`@/components/CameraContent-${Number(route.query.sceneIdx) + 1}-${Number(route.query.cameraIdx) + 1}-1.vue`)
|
|
|
|
+ )
|
|
|
|
+ CameraContent2 = defineAsyncComponent(() =>
|
|
|
|
+ import(`@/components/CameraContent-${Number(route.query.sceneIdx) + 1}-${Number(route.query.cameraIdx) + 1}-2.vue`)
|
|
|
|
+ )
|
|
|
|
+ CameraContent3 = defineAsyncComponent(() =>
|
|
|
|
+ import(`@/components/CameraContent-${Number(route.query.sceneIdx) + 1}-${Number(route.query.cameraIdx) + 1}-3.vue`)
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
|
|
const {
|
|
const {
|
|
windowSizeInCssForRef,
|
|
windowSizeInCssForRef,
|
|
@@ -274,14 +342,40 @@ const currentCameraList = computed(() => {
|
|
|
|
|
|
const mouseEnterCameraItemIdx = ref(-1)
|
|
const mouseEnterCameraItemIdx = ref(-1)
|
|
|
|
|
|
|
|
+const sceneChangeEffectVideo1 = ref(null)
|
|
|
|
+const sceneChangeEffectVideo2 = ref(null)
|
|
|
|
+const isShowEffectVideo1 = ref(false)
|
|
|
|
+const isShowEffectVideo2 = ref(false)
|
|
|
|
+const isShowEffectCloud = ref(false)
|
|
function onClickNextCamera() {
|
|
function onClickNextCamera() {
|
|
|
|
+ if (sceneIdx.value === 0) {
|
|
|
|
+ isShowEffectVideo1.value = true
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ sceneChangeEffectVideo1.value.play()
|
|
|
|
+ }, 1000)
|
|
|
|
+ } else if (sceneIdx.value === 1) {
|
|
|
|
+ isShowEffectVideo2.value = true
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ sceneChangeEffectVideo2.value.play()
|
|
|
|
+ }, 1000)
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+function onEffectVideoEnd() {
|
|
|
|
+ isShowEffectCloud.value = true
|
|
router.push({
|
|
router.push({
|
|
name: route.name,
|
|
name: route.name,
|
|
query: {
|
|
query: {
|
|
- sceneIdx: sceneIdx.value + 1,
|
|
|
|
- cameraIdx: cameraIdx.value,
|
|
|
|
|
|
+ sceneIdx: Number(route.query.sceneIdx) + 1,
|
|
|
|
+ cameraIdx: 0,
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ isShowEffectVideo1.value = false
|
|
|
|
+ isShowEffectVideo2.value = false
|
|
|
|
+ }, 1000)
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ isShowEffectCloud.value = false
|
|
|
|
+ }, 2500)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -420,9 +514,9 @@ onMounted(() => {
|
|
|
|
|
|
onBeforeRouteUpdate((to, from) => {
|
|
onBeforeRouteUpdate((to, from) => {
|
|
console.log('to: ', to)
|
|
console.log('to: ', to)
|
|
- // if (to.name === route.name) {
|
|
|
|
- // loadScene(Number(to.query.sceneIdx), Number(to.query.cameraIdx))
|
|
|
|
- // }
|
|
|
|
|
|
+ if (to.name === route.name) {
|
|
|
|
+ loadScene(Number(to.query.sceneIdx), Number(to.query.cameraIdx))
|
|
|
|
+ }
|
|
})
|
|
})
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@@ -684,6 +778,87 @@ onBeforeRouteUpdate((to, from) => {
|
|
>.camera-content{
|
|
>.camera-content{
|
|
z-index: 10;
|
|
z-index: 10;
|
|
}
|
|
}
|
|
|
|
+ >video.sceneChangeEffectVideo{
|
|
|
|
+ position: absolute;
|
|
|
|
+ left: 0;
|
|
|
|
+ top: 0;
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100%;
|
|
|
|
+ background-color: black;
|
|
|
|
+ z-index: 11;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .cloud-top{
|
|
|
|
+ position: absolute;
|
|
|
|
+ width: 100%;
|
|
|
|
+ top: 0;
|
|
|
|
+ left: 0;
|
|
|
|
+ z-index: 12;
|
|
|
|
+ }
|
|
|
|
+ .cloud-top-enter-active {
|
|
|
|
+ transition: all 1.5s;
|
|
|
|
+ }
|
|
|
|
+ .cloud-top-leave-active {
|
|
|
|
+ transition: all 1.5s;
|
|
|
|
+ pointer-events: none;
|
|
|
|
+ }
|
|
|
|
+ .cloud-top-enter-from {
|
|
|
|
+ opacity: 0;
|
|
|
|
+ translate: 0 -100%;
|
|
|
|
+ }
|
|
|
|
+ .cloud-top-leave-to {
|
|
|
|
+ opacity: 0;
|
|
|
|
+ top: -50%;
|
|
|
|
+ translate: 0 -100%;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .cloud-left-bottom{
|
|
|
|
+ position: absolute;
|
|
|
|
+ left: 0;
|
|
|
|
+ bottom: 0;
|
|
|
|
+ height: 70%;
|
|
|
|
+ z-index: 12;
|
|
|
|
+ }
|
|
|
|
+ .cloud-left-bottom-enter-active {
|
|
|
|
+ transition: all 1.5s;
|
|
|
|
+ }
|
|
|
|
+ .cloud-left-bottom-leave-active {
|
|
|
|
+ transition: all 1.5s;
|
|
|
|
+ pointer-events: none;
|
|
|
|
+ }
|
|
|
|
+ .cloud-left-bottom-enter-from {
|
|
|
|
+ opacity: 0;
|
|
|
|
+ translate: -100% 100%;
|
|
|
|
+ }
|
|
|
|
+ .cloud-left-bottom-leave-to {
|
|
|
|
+ opacity: 0;
|
|
|
|
+ pointer-events: none;
|
|
|
|
+ translate: -100% 100%;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .cloud-right-bottom{
|
|
|
|
+ position: absolute;
|
|
|
|
+ right: 0;
|
|
|
|
+ bottom: 0;
|
|
|
|
+ height: 95%;
|
|
|
|
+ z-index: 12;
|
|
|
|
+ }
|
|
|
|
+ .cloud-right-bottom-enter-active {
|
|
|
|
+ transition: all 1.5s;
|
|
|
|
+ }
|
|
|
|
+ .cloud-right-bottom-leave-active {
|
|
|
|
+ transition: all 1.5s;
|
|
|
|
+ pointer-events: none;
|
|
|
|
+ }
|
|
|
|
+ .cloud-right-bottom-enter-from {
|
|
|
|
+ opacity: 0;
|
|
|
|
+ translate: 100% 100%;
|
|
|
|
+ }
|
|
|
|
+ .cloud-right-bottom-leave-to {
|
|
|
|
+ opacity: 0;
|
|
|
|
+ pointer-events: none;
|
|
|
|
+ translate: 100% 100%;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
@keyframes character-default-animation {
|
|
@keyframes character-default-animation {
|
|
0% {
|
|
0% {
|