"use client"; import type { ReactNode } from "react"; import { motion, useReducedMotion } from "motion/react"; type MeshBloomProps = { children?: ReactNode; className?: string; /** Four colours, one per corner. */ colors?: [string, string, string, string]; background?: string; /** 1 is the default pace; 2 is twice as fast. */ speed?: number; }; const CORNERS = ["left-0 top-0", "right-0 top-0", "right-0 bottom-0", "left-0 bottom-0"]; /* MeshBloom: four colour blooms breathe in the corners while the whole mesh turns slowly. */ export function MeshBloom({ children, className = "", colors = ["#a78bfa", "#ff5fa2", "#38bdf8", "#34d399"], background = "#0a0814", speed = 1, }: MeshBloomProps) { const reduce = useReducedMotion(); return (
{colors.map((c, i) => ( ))}
{children}
); }