"use client"; import type { ReactNode } from "react"; import { motion, useReducedMotion } from "motion/react"; type GradientOrbitProps = { children?: ReactNode; className?: string; /** One colour per orb. */ colors?: [string, string, string]; background?: string; /** 1 is the default pace; 2 is twice as fast. */ speed?: number; }; // Where each orb sits before its ring turns; rings turn at different speeds and directions. const ORBS = [ { left: "50%", top: "8%", d: 22, dir: 1 }, { left: "8%", top: "40%", d: 30, dir: -1 }, { left: "38%", top: "55%", d: 38, dir: 1 }, ]; /* GradientOrbit: three soft colour orbs circle the centre on their own rings, blending as they pass. */ export function GradientOrbit({ children, className = "", colors = ["#a78bfa", "#22d3ee", "#f472b6"], background = "#07060f", speed = 1, }: GradientOrbitProps) { const reduce = useReducedMotion(); return (
{ORBS.map((o, i) => (
))}
{children}
); }