UNPKG

wheel-duo

Version:

Animated dual-wheel component with customizable spin, sway, and callback support

46 lines (42 loc) 1.21 kB
export declare class WheelDuo { private domRefs; private swayAnimation; private swayingElement; private readonly runtime; private readonly config; private readonly onFirstClick; private readonly onSecondClick; constructor(options: Readonly<WheelDuoOptions>); init(): void; destroy(): void; reset(): void; private warmUp; private runPhaseOne; private runPhaseTwo; private rotateWheelTo; private startSway; private stopSway; private normalize; private getCurrentRotation; private cancelAnimations; private getDomRefs; private getRequiredElement; } export declare interface WheelDuoOptions { rootSelector: string; firstWheelSelector: string; secondWheelSelector: string; triggerSelector: string; targetAngles: readonly [number, number]; rotations?: number; duration?: number; overshootDeg?: number; returnDuration?: number; swayOptions?: { amplitude?: number; period?: number; }; callback?: () => void; } export declare type WheelDuoPhase = 'idle' | 'spinningFirst' | 'spinningSecond' | 'complete'; export { }