'use client'; import { motion } from 'framer-motion'; /** * DrillBitSpinner * * Abstract animated drill head cross-section. * Resembles an HDD tri-blade drill bit seen from the front. * * - 3 rotating cutting blades at 120° intervals * - Outer halo ring * - Inner core circle * - Continuous rotation with optional pulse glow * * Zero layout impact — position it absolutely in its parent. */ interface DrillBitSpinnerProps { /** Diameter in pixels */ size?: number; /** Color of the drill elements */ color?: string; /** Rotation duration in seconds */ duration?: number; /** Overall opacity 0–1 */ opacity?: number; /** Whether to show a pulse glow ring */ glow?: boolean; className?: string; } export function DrillBitSpinner({ size = 120, color = '#0e7a5c', duration = 8, opacity = 1, glow = true, className = '', }: DrillBitSpinnerProps) { const r = size / 2; const outerR = r * 0.92; const bladeLen = r * 0.62; const bladeW = r * 0.18; const coreR = r * 0.22; // 3 blade tip positions at 120° intervals // Each blade: a rounded rectangle swept from center outward const blades = [0, 120, 240].map((deg) => { const rad = (deg * Math.PI) / 180; return { x: r + Math.cos(rad) * (bladeLen * 0.5), y: r + Math.sin(rad) * (bladeLen * 0.5), rotate: deg, }; }); return (
); }