"use client"; import { motion, useReducedMotion } from "framer-motion"; import clsx from "clsx"; type Props = { className?: string; accent?: string; bg?: string; gridStroke?: string; }; const W = 720; // 4:3 width const H = 540; // 4:3 height export default function Connectivity({ className, accent = "#00b8db", bg = "#0b0b0b", gridStroke = "#2b2a2a", }: Props) { const prefers = useReducedMotion(); // Hex-like P2P topology — all peers connect *directly* const pods = [ { x: 250, y: 160 }, { x: 470, y: 160 }, { x: 580, y: 290 }, { x: 470, y: 420 }, { x: 250, y: 420 }, { x: 140, y: 290 }, ]; // Every pod connects to every other pod = full direct mesh const links: [number, number][] = []; for (let i = 0; i < pods.length; i++) { for (let j = i + 1; j < pods.length; j++) links.push([i, j]); } const line = (i: number, j: number) => { const a = pods[i], b = pods[j]; return `M ${a.x} ${a.y} L ${b.x} ${b.y}`; }; return (
{/* ========= GRID + FILTERS ========= */} {/* Cyan soft gradient for pods */} {/* ========= BASE CONNECTION LINES (Full Mesh) ========= */} {links.map(([i, j], idx) => ( ))} {/* ========= ACCENT DASH (Active P2P links) ========= */} {links.map(([i, j], idx) => ( ))} {/* ========= MOVING SIGNALS (Direct P2P) ========= */} {!prefers && links.map(([i, j], idx) => ( ))} {/* ========= CLOUD PODS ========= */} {pods.map((p, i) => ( {/* Outer soft cyan aura */} {!prefers && ( )} {/* Pod body */} {/* Inner dark core */} ))}
); }