add brand logo flying animation
@@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<img
|
||||
v-for="n in rowCount * colCount"
|
||||
:key="n"
|
||||
class="dot"
|
||||
:src="currentIndexToSrcMap[n - 1]"
|
||||
@animationiteration="
|
||||
(ev) => {
|
||||
handleAnimationiteration(ev, n - 1)
|
||||
}
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { logoQueueInjectKey } from './types'
|
||||
|
||||
const logoQueue = ref<string[]>([])
|
||||
|
||||
const rowCount = 6
|
||||
const colCount = 5
|
||||
const currentIndexToSrcMap: string[] = ref([])
|
||||
|
||||
Promise.all(
|
||||
[...Object.values(import.meta.glob('./resources/*.png', { as: 'url' }))].map((it) => it())
|
||||
).then((res) => {
|
||||
logoQueue.value = logoQueue.value.concat(res)
|
||||
currentIndexToSrcMap.value = logoQueue.value.splice(0, rowCount * colCount)
|
||||
})
|
||||
|
||||
const handleAnimationiteration = (ev, indexInSrcMap) => {
|
||||
logoQueue.value.push(currentIndexToSrcMap.value[indexInSrcMap])
|
||||
currentIndexToSrcMap.value[indexInSrcMap] = logoQueue.value.shift()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@keyframes fly-in {
|
||||
0% {
|
||||
transform: translateZ(-2500px);
|
||||
opacity: 0;
|
||||
}
|
||||
25% {
|
||||
opacity: 1;
|
||||
}
|
||||
75% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
100% {
|
||||
transform: translateZ(0);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
height: 600px;
|
||||
perspective: 1200px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(6, 1fr);
|
||||
grid-template-rows: repeat(5, 1fr);
|
||||
align-items: center;
|
||||
justify-items: center;
|
||||
justify-content: center;
|
||||
gap: 30px;
|
||||
}
|
||||
|
||||
.dot {
|
||||
display: block;
|
||||
--dot-run-duration: 1.5s;
|
||||
animation: fly-in var(--dot-run-duration) linear infinite;
|
||||
transform-origin: center;
|
||||
mix-blend-mode: darken;
|
||||
width: 200px;
|
||||
}
|
||||
.dot:nth-child(2n + 1) {
|
||||
animation-delay: calc(-0.1 * var(--dot-run-duration));
|
||||
}
|
||||
.dot:nth-child(3n + 1) {
|
||||
animation-delay: calc(-0.2 * var(--dot-run-duration));
|
||||
}
|
||||
.dot:nth-child(5n + 1) {
|
||||
animation-delay: calc(-0.1 * var(--dot-run-duration));
|
||||
}
|
||||
.dot:nth-child(7n + 1) {
|
||||
animation-delay: calc(-0.4 * var(--dot-run-duration));
|
||||
}
|
||||
.dot:nth-child(11n + 1) {
|
||||
animation-delay: calc(-0.5 * var(--dot-run-duration));
|
||||
}
|
||||
.dot:nth-child(13n + 1) {
|
||||
animation-delay: calc(0 * var(--dot-run-duration));
|
||||
}
|
||||
.dot:nth-child(17n + 1) {
|
||||
animation-delay: calc(-0.1 * var(--dot-run-duration));
|
||||
}
|
||||
</style>
|
||||
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/SKP.png
Executable file
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 9.6 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/atour.png
Executable file
|
After Width: | Height: | Size: 24 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/baili.png
Executable file
|
After Width: | Height: | Size: 28 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/basifu.png
Executable file
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 31 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/danei.png
Executable file
|
After Width: | Height: | Size: 48 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/deli.png
Executable file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/dian.png
Executable file
|
After Width: | Height: | Size: 55 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/didi.png
Executable file
|
After Width: | Height: | Size: 21 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/diezhi.png
Executable file
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 32 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/douyu.png
Executable file
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 26 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/fila.png
Executable file
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 15 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/fuxing.png
Executable file
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 27 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/guilin.png
Executable file
|
After Width: | Height: | Size: 58 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/haida.png
Executable file
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 40 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/huazhu.png
Executable file
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 44 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/huize.png
Executable file
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 61 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/jinko.png
Executable file
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/jnby.png
Executable file
|
After Width: | Height: | Size: 14 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/kaaosi.png
Executable file
|
After Width: | Height: | Size: 11 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/kaili.png
Executable file
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 23 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/laoban.png
Executable file
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 17 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/lexue.png
Executable file
|
After Width: | Height: | Size: 12 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/lilisi.png
Executable file
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 34 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/nandu.png
Executable file
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 30 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/puxin.png
Executable file
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 34 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/ruhan.png
Executable file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/ruijie.png
Executable file
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 61 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/senma.png
Executable file
|
After Width: | Height: | Size: 40 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/shiji.png
Executable file
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 54 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/shopee.png
Executable file
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 48 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/sougou.png
Executable file
|
After Width: | Height: | Size: 37 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/souhu.png
Executable file
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 49 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/tuhu.png
Executable file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/tyson.png
Executable file
|
After Width: | Height: | Size: 45 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/wanfu.png
Executable file
|
After Width: | Height: | Size: 33 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/wanke.png
Executable file
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 91 KiB |
|
After Width: | Height: | Size: 41 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/wendu.png
Executable file
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 52 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/xiaomi.png
Executable file
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 34 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/yadi.png
Executable file
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 48 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/yintai.png
Executable file
|
After Width: | Height: | Size: 49 KiB |
BIN
packages/ui/src/renderer/src/features/FlyingCompanyLogoList/resources/yitu.png
Executable file
|
After Width: | Height: | Size: 20 KiB |