4 Commits

Author SHA1 Message Date
kudinDmitriyUp
396fec70c5 Bob AI: Update splash screen transition to a rising multi-layer wate 2026-06-22 22:05:59 +00:00
d197cc46fc Merge version_4_1782165459376 into main
Merge version_4_1782165459376 into main
2026-06-22 21:59:26 +00:00
kudinDmitriyUp
76f79f0524 Bob AI: Update splash screen with clear button and realistic waves 2026-06-22 21:58:46 +00:00
fdf8b33682 Merge version_3_1782165191955 into main
Merge version_3_1782165191955 into main
2026-06-22 21:55:43 +00:00

View File

@@ -22,22 +22,13 @@ export default function SplashSection() {
setIsSplashing(true);
setTimeout(() => {
setIsVisible(false);
}, 1500);
}, 2000);
};
const droplets = Array.from({ length: 40 }).map((_, i) => {
const angle = (i / 40) * Math.PI * 2;
const distance = 200 + Math.random() * 300;
const tx = Math.cos(angle) * distance;
const ty = Math.sin(angle) * distance;
const scale = 0.5 + Math.random() * 1.5;
return { tx, ty, scale, delay: Math.random() * 0.15 };
});
return (
<div
data-webild-section="splash"
className={`fixed inset-0 z-[100] flex flex-col items-center justify-center bg-background overflow-hidden transition-opacity duration-500 ${isSplashing ? 'opacity-0 delay-1000' : 'opacity-100'}`}
className={`fixed inset-0 z-[100] flex flex-col items-center justify-center bg-background overflow-hidden transition-opacity duration-700 ${isSplashing ? 'opacity-0 delay-[1300ms]' : 'opacity-100'}`}
>
<div className="relative z-30 text-center px-4 w-full max-w-5xl mx-auto">
<h1 className={`relative z-10 text-4xl md:text-6xl font-bold text-foreground mb-12 drop-shadow-sm transition-all duration-500 ${isSplashing ? 'opacity-0 -translate-y-8' : 'opacity-100 translate-y-0'}`}>
@@ -45,42 +36,68 @@ export default function SplashSection() {
</h1>
<div className="relative inline-block z-20">
{/* Expanding Water Splash Background */}
<div
className={`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-0 rounded-full transition-all duration-1000 ease-in-out pointer-events-none ${isSplashing ? 'w-[300vw] h-[300vw] opacity-100' : 'w-0 h-0 opacity-0'}`}
style={{
backgroundImage: "url('https://images.unsplash.com/photo-1527066236129-8bf29eb3c05a?auto=format&fit=crop&q=80')",
backgroundSize: 'cover',
backgroundPosition: 'center',
backgroundBlendMode: 'overlay',
backgroundColor: 'rgba(37, 99, 235, 0.9)',
boxShadow: 'inset 0 0 100px rgba(255,255,255,0.6), 0 0 50px rgba(37,99,235,0.8)'
}}
/>
<button
onClick={handleEnter}
className={`relative z-10 group overflow-hidden rounded-full px-10 py-5 text-xl md:text-2xl font-bold text-white shadow-[0_15px_30px_rgba(21,71,156,0.4),inset_0_-4px_0_rgba(0,0,0,0.2),inset_0_2px_0_rgba(255,255,255,0.6)] bg-gradient-to-b from-blue-400 to-blue-700 border border-blue-800 transition-all duration-300 ${isSplashing ? 'opacity-0 scale-150' : 'opacity-100 scale-100 hover:scale-105 active:scale-95'}`}
className={`relative z-10 group overflow-hidden rounded-full px-10 py-5 text-xl md:text-2xl font-bold text-foreground backdrop-blur-md bg-white/40 border border-white/60 shadow-[0_8px_32px_rgba(0,0,0,0.05)] transition-all duration-300 ${isSplashing ? 'opacity-0 scale-110' : 'opacity-100 scale-100 hover:scale-105 hover:bg-white/50 active:scale-95'}`}
>
<span className="relative z-10 drop-shadow-lg">Enter the New Era of Plumbing</span>
<div className="absolute top-0 left-0 right-0 h-1/2 bg-gradient-to-b from-white/30 to-transparent rounded-t-full pointer-events-none" />
<span className="relative z-10">Enter the New Era of Plumbing</span>
<div className="absolute inset-0 bg-gradient-to-tr from-white/20 to-transparent pointer-events-none rounded-full" />
</button>
{/* Droplets */}
{isSplashing && droplets.map((d, i) => (
<motion.div
key={i}
initial={{ x: 0, y: 0, scale: 0, opacity: 1 }}
animate={{ x: d.tx, y: d.ty, scale: d.scale, opacity: 0 }}
transition={{ duration: 0.8, delay: d.delay, ease: "easeOut" }}
className="absolute top-1/2 left-1/2 w-6 h-6 -ml-3 -mt-3 bg-blue-200 rounded-full pointer-events-none z-20 shadow-[0_0_15px_rgba(147,197,253,0.9)]"
style={{
backgroundImage: "radial-gradient(circle at 30% 30%, rgba(255,255,255,1), rgba(147,197,253,0.4))"
}}
/>
))}
</div>
</div>
{/* Rising Water Waves */}
{isSplashing && (
<div className="absolute inset-0 z-40 pointer-events-none overflow-hidden">
{/* Layer 1: Foam / Lightest Blue */}
<motion.div
initial={{ y: '100vh', x: '-2%' }}
animate={{ y: '-20vh', x: '2%' }}
transition={{
y: { duration: 0.9, ease: "easeInOut" },
x: { duration: 1.5, repeat: Infinity, repeatType: "reverse", ease: "easeInOut" }
}}
className="absolute left-[-10%] right-[-10%] w-[120%] h-[150vh] text-blue-200"
>
<svg viewBox="0 0 1440 320" preserveAspectRatio="none" className="w-full h-[100px] md:h-[150px] block">
<path fill="currentColor" d="M0,160L48,176C96,192,192,224,288,224C384,224,480,192,576,165.3C672,139,768,117,864,128C960,139,1056,181,1152,192C1248,203,1344,181,1392,170.7L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path>
</svg>
<div className="w-full h-full bg-blue-200 -mt-[1px]" />
</motion.div>
{/* Layer 2: Medium Blue */}
<motion.div
initial={{ y: '100vh', x: '2%' }}
animate={{ y: '-10vh', x: '-2%' }}
transition={{
y: { duration: 1.0, ease: "easeInOut", delay: 0.1 },
x: { duration: 1.8, repeat: Infinity, repeatType: "reverse", ease: "easeInOut" }
}}
className="absolute left-[-10%] right-[-10%] w-[120%] h-[150vh] text-blue-400"
>
<svg viewBox="0 0 1440 320" preserveAspectRatio="none" className="w-full h-[100px] md:h-[150px] block">
<path fill="currentColor" d="M0,224L48,213.3C96,203,192,181,288,181.3C384,181,480,203,576,208C672,213,768,203,864,176C960,149,1056,107,1152,106.7C1248,107,1344,149,1392,170.7L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path>
</svg>
<div className="w-full h-full bg-blue-400 -mt-[1px]" />
</motion.div>
{/* Layer 3: Dark Blue (Main) */}
<motion.div
initial={{ y: '100vh', x: '-1%' }}
animate={{ y: '-5vh', x: '3%' }}
transition={{
y: { duration: 1.1, ease: "easeInOut", delay: 0.2 },
x: { duration: 2.0, repeat: Infinity, repeatType: "reverse", ease: "easeInOut" }
}}
className="absolute left-[-10%] right-[-10%] w-[120%] h-[150vh] text-blue-600"
>
<svg viewBox="0 0 1440 320" preserveAspectRatio="none" className="w-full h-[100px] md:h-[150px] block">
<path fill="currentColor" stroke="rgba(255,255,255,0.4)" strokeWidth="4" d="M0,128L48,144C96,160,192,192,288,197.3C384,203,480,181,576,160C672,139,768,117,864,122.7C960,128,1056,160,1152,165.3C1248,171,1344,149,1392,138.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path>
</svg>
<div className="w-full h-full bg-blue-600 -mt-[1px]" />
</motion.div>
</div>
)}
</div>
);
}