/** * Animation Coordinator - Global animation loop manager for all gauge components * * This module provides a centralized animation system that: * - Batches animations across all gauge instances into a single RAF loop * - Prevents visual stuttering by distributing updates * - Allows FPS limiting at the global level * - Supports animation priority and staggering */ type AnimationCallback = (timestamp: number, deltaTime: number) => boolean; declare class AnimationCoordinator { private animations; private isRunning; private lastFrameTime; private frameId; private targetFps; private minFrameTime; private static instance; static getInstance(): AnimationCoordinator; /** * Set the target FPS for all animations */ setTargetFps(fps: number): void; /** * Register an animation callback * @param id Unique identifier for this animation * @param callback Function called each frame, returns false when complete * @param priority Higher priority animations are updated first (default: 0) */ register(id: string, callback: AnimationCallback, priority?: number): void; /** * Unregister an animation */ unregister(id: string): void; /** * Check if an animation is currently registered */ isRegistered(id: string): boolean; /** * Get the number of active animations */ getActiveCount(): number; private start; private stop; private tick; /** * Stagger animation starts to prevent all gauges from animating at exact same time * Returns a delay in ms based on current animation count */ getStaggerDelay(baseDelay?: number): number; } export declare const animationCoordinator: AnimationCoordinator; export declare const registerAnimation: (id: string, callback: AnimationCallback, priority?: number) => void; export declare const unregisterAnimation: (id: string) => void; export declare const setGlobalAnimationFps: (fps: number) => void; export declare const getAnimationStaggerDelay: (baseDelay?: number) => number; export declare const isAnimationActive: (id: string) => boolean; export declare const getActiveAnimationCount: () => number; export {};