/** * @nexart/ui-renderer - FPS Throttle * * Simple FPS cap for continuous preview animation. * No frame limits, no time limits — just throttled rendering. * * ╔══════════════════════════════════════════════════════════════════════════╗ * ║ FPS THROTTLE — CONTINUOUS ANIMATION ║ * ║ ║ * ║ Target FPS: 8 (125ms per frame) ║ * ║ No frame limit — runs until stop() is called ║ * ║ No time limit — runs indefinitely ║ * ╚══════════════════════════════════════════════════════════════════════════╝ */ import { type FpsThrottleState } from './preview-types'; /** * Create a new FPS throttle state */ export declare function createFpsThrottle(): FpsThrottleState; /** * Check if enough time has passed to render the next frame. * Returns true if we should render, false if we should skip this RAF tick. */ export declare function shouldRenderFrame(throttle: FpsThrottleState): boolean; /** * Record that a frame was rendered (updates last frame time) */ export declare function recordFrame(throttle: FpsThrottleState): void; /** * Reset the throttle for a new render session */ export declare function resetThrottle(throttle: FpsThrottleState): void; /** * @deprecated Legacy type alias for backward compatibility. * Use FpsThrottleState instead. */ export type FrameBudgetState = FpsThrottleState; /** @deprecated Use createFpsThrottle instead */ export declare function createFrameBudget(): FpsThrottleState; /** * @deprecated Use shouldRenderFrame instead. * * COMPATIBILITY NOTE: This now delegates to shouldRenderFrame. * For legacy code that interprets `false` as "budget exhausted forever", * this will work correctly because: * - Returns true when enough time has passed (ready to render) * - Returns false when throttled (wait for next tick) * - Never permanently exhausts like the old budget system */ export declare function canRenderFrame(throttle: FpsThrottleState): boolean; /** @deprecated Use resetThrottle instead */ export declare function resetBudget(throttle: FpsThrottleState): void; /** @deprecated No longer used — removed frame stride. Always returns false. */ export declare function shouldSkipFrame(_frameCount: number): boolean; /** @deprecated No longer tracked. Returns 0. */ export declare function getElapsedMs(_throttle: FpsThrottleState): number; //# sourceMappingURL=frame-budget.d.ts.map