feat: 在 App.vue 组件中添加装饰性背景元素,包括花朵、云朵和彩虹光晕,优化背景样式和动画效果,同时调整 ParticleBackground 组件的粒子数量和样式以提升视觉效果。
This commit is contained in:
@@ -12,17 +12,18 @@ const breakpoints = useBreakpoints({
|
||||
})
|
||||
|
||||
const isMobile = breakpoints.smaller('tablet')
|
||||
const particleCount = isMobile.value ? 800 : 1500
|
||||
const particleCount = isMobile.value ? 1000 : 1800
|
||||
|
||||
// 动画参数
|
||||
const config = {
|
||||
particleSize: 1.5,
|
||||
particleSize: 2,
|
||||
systemRadius: 15,
|
||||
baseSpeed: 0.2,
|
||||
baseSpeed: 0.15,
|
||||
hoverRadius: 3,
|
||||
color: 0x7ac5e8,
|
||||
lineColor: 0x5ab0d6,
|
||||
lineDistance: 2.5
|
||||
color: 0xb4e0f7,
|
||||
lineColor: 0xa8d8ea,
|
||||
lineDistance: 3,
|
||||
particleCount: isMobile.value ? 1000 : 1800
|
||||
}
|
||||
|
||||
let scene, camera, renderer, particles, lines, mouse = { x: 0, y: 0 }
|
||||
@@ -220,14 +221,15 @@ onUnmounted(() => {
|
||||
height: 100%;
|
||||
z-index: var(--z-index-particle);
|
||||
pointer-events: none;
|
||||
opacity: 0.6;
|
||||
opacity: 0.4;
|
||||
mix-blend-mode: screen;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
/* 移动设备降低不透明度 */
|
||||
/* 移动设备优化 */
|
||||
@media (max-width: 768px) {
|
||||
.particle-canvas {
|
||||
opacity: 0.3;
|
||||
opacity: 0.2;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user