'use client'; import { motion, useInView } from 'framer-motion'; import { useRef } from 'react'; /** * DrillOrbit * * A glowing point continuously looping along a parabolic arc — * evoking the trajectory of a horizontal directional drill bit. * * The arc is drawn once on scroll-entry. The dot then loops forever. * Place inside any `relative overflow-hidden` section. Zero layout impact. */ type Side = 'left' | 'right'; interface DrillOrbitProps { /** Which side of the section to anchor to */ side?: Side; /** Invert colors for light backgrounds */ invert?: boolean; className?: string; } // The parabolic bore path (left-to-right across a 800×200 canvas) const PATH = 'M -20 80 C 150 80 200 340 400 340 C 600 340 650 80 820 80'; export function DrillOrbit({ side = 'right', invert = false, className = '', }: DrillOrbitProps) { const ref = useRef(null); const isInView = useInView(ref, { once: true, margin: '0px 0px -10% 0px' }); const color = invert ? '#084c39' : '#0e7a5c'; const glowColor = invert ? 'rgba(8,76,57,0.35)' : 'rgba(14,122,92,0.45)'; return ( ); }