UNPKG

@erosnicolau/animated-text

Version:

Advanced React animated text component with comprehensive animation effects

58 lines 1.95 kB
/** * FPS-Based Performance Monitor - Real-time frame rate monitoring */ export interface FPSPerformanceConfig { fpsThreshold: number; sampleSize: number; activationDelay: number; recoveryTime: number; enableLogging: boolean; storageKey: string; } export interface FPSMetrics { currentFPS: number; isMonitoring: boolean; activeAnimations: number; isPerformanceModeActive: boolean; isManuallyForced: boolean; fpsThreshold: number; timeInLowFPS: number; } declare class FPSPerformanceMonitor { private static instance; private frames; private lastTime; private animationId; private activeAnimations; private isMonitoring; private lowFPSStartTime; private performanceModeTimeout; private manuallyForcedFlag; private readonly config; private constructor(); static getInstance(): FPSPerformanceMonitor; registerAnimation(animationId: string): void; unregisterAnimation(animationId: string): void; private startMonitoring; private stopMonitoring; private measureFrame; private checkPerformance; private activatePerformanceMode; private deactivatePerformanceMode; isPerformanceModeActive(): boolean; isManuallyForced(): boolean; getMetrics(): FPSMetrics; updateFPSThreshold(newThreshold: number): void; private initializeFromStorage; forceActivatePerformanceMode(): void; forceDeactivatePerformanceMode(): void; reset(): void; } export declare const fpsPerformanceMonitor: FPSPerformanceMonitor; export declare const registerAnimation: (animationId: string) => void; export declare const unregisterAnimation: (animationId: string) => void; export declare const isPerformanceModeActive: () => boolean; export declare const getFPSMetrics: () => FPSMetrics; export declare const updateFPSThreshold: (threshold: number) => void; export {}; //# sourceMappingURL=FPSPerformanceMonitor.d.ts.map