diff --git a/web/src/sections/Ecosystem.tsx b/web/src/sections/Ecosystem.tsx index 0a12774..c5e2505 100644 --- a/web/src/sections/Ecosystem.tsx +++ b/web/src/sections/Ecosystem.tsx @@ -51,14 +51,17 @@ interface Wire { y1: number; x2: number; y2: number; - delay: string; + spread: number; + id: string; } const HUB_RADIUS = 78; +const SPREAD_PX = 52; /** * Diagram rdzenia (lg+): kafelki uczestników z naturalną wysokością (nic się nie - * ucina) i przerywane wiązania mierzone w DOM (ResizeObserver). + * ucina) i promienie—trójkąty mierzone w DOM (ResizeObserver): wierzchołek na + * obwodzie rdzenia, podstawa na ścianie kafelka. */ function HubDiagram() { const containerRef = useRef(null); @@ -73,10 +76,10 @@ function HubDiagram() { if (!container) return; const targets = [ - { el: trenerRef.current, side: 'left' as const, delay: '0s' }, - { el: silowniaRef.current, side: 'left' as const, delay: '-0.5s' }, - { el: cwiczacyRef.current, side: 'right' as const, delay: '-0.9s' }, - { el: adminRef.current, side: 'right' as const, delay: '-1.3s' }, + { el: trenerRef.current, side: 'left' as const, id: 'trener' }, + { el: silowniaRef.current, side: 'left' as const, id: 'silownia' }, + { el: cwiczacyRef.current, side: 'right' as const, id: 'cwiczacy' }, + { el: adminRef.current, side: 'right' as const, id: 'admin' }, ]; const compute = () => { @@ -98,7 +101,9 @@ function HubDiagram() { y1: ((cy + (dy / len) * HUB_RADIUS) / cr.height) * 100, x2: (((t.side === 'left' ? r.right : r.left) - cr.left) / cr.width) * 100, y2: (midY / cr.height) * 100, - delay: t.delay, + // połowa podstawy trójkąta jako % wysokości kontenera + spread: SPREAD_PX / cr.height, + id: t.id, }); } setWires(next); @@ -129,19 +134,27 @@ function HubDiagram() { preserveAspectRatio="none" className="absolute inset-0 h-full w-full" > + + {wires.map((w) => ( + + + + + ))} + {wires.map((w) => ( - ))} diff --git a/web/src/styles.css b/web/src/styles.css index 44919c0..addc393 100644 --- a/web/src/styles.css +++ b/web/src/styles.css @@ -154,18 +154,6 @@ animation: streak-ignite 260ms var(--ease-out-quart) backwards; } -/* Rdzeń ekosystemu — przepływ po przerywanych wiązaniach */ -@keyframes dash-flow { - to { - stroke-dashoffset: -16; - } -} - -.link-line { - stroke-dasharray: 4 4; - animation: dash-flow 1.4s linear infinite; -} - /* Wejścia sekcji na scroll (IntersectionObserver dodaje .revealed) */ .reveal { opacity: 0; @@ -276,10 +264,6 @@ animation: none; } - .link-line { - animation: none; - } - .reveal { opacity: 1; transform: none;