This commit is contained in:
梁泽军 2025-03-03 17:59:19 +08:00
parent c3e04a1ad8
commit ebfab921df
7 changed files with 1156 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 KiB

After

Width:  |  Height:  |  Size: 1.2 MiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -27,6 +27,7 @@
</div>
<div class="top-bird-1"></div>
<div class="top-bird-2"></div>
<div class="wh-cloud"></div>
<div class="crane-1"></div>
<div class="crane-2"></div>
<div class="boat-1"></div>
@ -51,6 +52,8 @@
</div>
<div class="cls-btn" @click="hideVideo"></div>
</div>
<Line />
</template>
<script setup>
@ -59,6 +62,8 @@ import Plyr from 'plyr';
import 'plyr/dist/plyr.css'; // Plyr
import ImageFramePlayer from 'image-frame-player';
import {showSuccessToast} from "vant";
import Line from './Line.vue';
const playerRef = ref(null)
const frame = ref(null)
@ -361,10 +366,16 @@ const animationFn = () => {
pointer-events: none;
}
.wh-cloud {
@include bgSrc("index/wh-cloud.png");
@include pos(324px, 298px, 9px, 1061px);
pointer-events: none;
}
.location {
.index-location-bj {
@include bgSrc("index/location-bj.png");
@include pos(644px, 217px, 105px, 384px);
@include pos(507px, 233px, 142px, 341px);
}
.index-location-xa {

55
src/components/Line.vue Normal file
View File

@ -0,0 +1,55 @@
<template>
<div class="container">
<!-- SVG路径作为轨迹 -->
<svg style="display: none;">
<path id="path" d="M10 80 L40 50 C60 30 80 80 100 50 S140 20 180 80" />
</svg>
<!-- 动画元素 -->
<div class="box"></div>
</div>
</template>
<script setup>
import { onMounted } from 'vue';
import { gsap } from 'gsap';
// PathPluginGSAP 3.9.0+
gsap.registerPlugin(gsap.PathPlugin);
console.log('gsap',gsap);
onMounted(() => {
const box = document.querySelector('.box');
const path = document.getElementById('path');
//
gsap.to(box, {
duration: 5,
ease: 'power2.inOut',
motionPath: {
path: path, // SVG
align: 'start', //
autoRotate: true // GSAP 3.9.0+
}
});
});
</script>
<style>
.container {
position: relative;
width: 100%;
height: 600px;
}
.box {
width: 50px;
height: 50px;
background-color: red;
position: absolute;
top: 80px; /* 初始位置与SVG路径起点对齐 */
left: 10px;
}
</style>