import { motion } from 'framer-motion'; import { useMemo } from 'react'; const BackgroundAnimations = () => { // Particles with better visibility (increased opacity and size) const particles = useMemo(() => { return Array.from({ length: 18 }, (_, i) => ({ id: i, x: Math.random() * 100, y: Math.random() * 100, size: Math.random() * 4 + 2, // Larger particles (2-6px instead of 1-3px) duration: Math.random() * 10 + 6, delay: Math.random() * 4, opacity: Math.random() * 0.4 + 0.5, // Much higher opacity (0.5-0.9) })); }, []); // Circuit nodes for tech effect const circuitNodes = useMemo(() => { return Array.from({ length: 8 }, (_, i) => ({ id: i, x: Math.random() * 80 + 10, y: Math.random() * 80 + 10, pulseDelay: Math.random() * 2, })); }, []); // Connection lines between nodes const connectionLines = useMemo(() => { const lines = []; for (let i = 0; i < circuitNodes.length - 1; i++) { if (i + 1 < circuitNodes.length) { lines.push({ id: i, x1: circuitNodes[i].x, y1: circuitNodes[i].y, x2: circuitNodes[i + 1].x, y2: circuitNodes[i + 1].y, }); } } return lines; }, [circuitNodes]); return (
{/* Animated Grid Background */} {/* SVG Container for Lines and Nodes */} {/* Animated Connection Lines */} {connectionLines.map((line) => ( ))} {/* Vertical Data Streams */} {[...Array(6)].map((_, i) => ( ))} {/* Circuit Nodes with pulse ring */} {circuitNodes.map((node) => ( {/* Pulse ring */} {/* Core node */} ))} {/* Floating Data Particles - highly visible */} {particles.map((particle) => ( ))} {/* Scanline Effect */} {/* Radial Glows */} {[ { x: 20, y: 30, size: 300 }, { x: 80, y: 70, size: 350 }, { x: 50, y: 50, size: 400 }, ].map((pos, i) => ( ))} {/* Corner Accent Glows */}
); }; export default BackgroundAnimations;