From 9b724e22c79a0f52423ade82725f795764bdcb71 Mon Sep 17 00:00:00 2001 From: zv Date: Mon, 1 Jun 2026 19:31:13 +0200 Subject: [PATCH] feat: enhance rain animation visibility --- components/weather/weather-effects.tsx | 18 ++++++++++-------- components/weather/weather-hero.tsx | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/components/weather/weather-effects.tsx b/components/weather/weather-effects.tsx index c65da8f..77a2b25 100644 --- a/components/weather/weather-effects.tsx +++ b/components/weather/weather-effects.tsx @@ -3,11 +3,13 @@ import { motion, useReducedMotion } from "framer-motion"; import type { SynopStation, WeatherMood } from "@/types/imgw"; -const rainDrops = Array.from({ length: 32 }, (_, index) => ({ +const rainDrops = Array.from({ length: 58 }, (_, index) => ({ left: `${(index * 29 + 7) % 100}%`, delay: (index % 11) * 0.13, - duration: 0.72 + (index % 5) * 0.12, - height: 12 + (index % 4) * 4, + duration: 0.72 + (index % 6) * 0.1, + height: 15 + (index % 5) * 5, + opacity: 0.48 + (index % 4) * 0.1, + width: index % 5 === 0 ? 2 : 1, })); const windLines = Array.from({ length: 7 }, (_, index) => ({ @@ -26,11 +28,11 @@ export function WeatherEffects({ station, mood }: { station: SynopStation; mood: const reduceMotion = useReducedMotion(); const rainfall = station.rainfall ?? 0; const isRaining = rainfall >= 0.1; - const visibleDrops = rainfall >= 5 ? rainDrops : rainDrops.slice(0, 18); + const visibleDrops = rainfall >= 5 ? rainDrops : rainfall >= 1 ? rainDrops.slice(0, 44) : rainDrops.slice(0, 30); const isWindy = (station.windSpeed ?? 0) >= 8; return ( -