resig.js
Version:
Universal reactive signal library with complete platform features: signals, animations, CRDTs, scheduling, DOM integration. Works identically across React, SolidJS, Svelte, Vue, and Qwik.
35 lines (34 loc) • 1.56 kB
TypeScript
/**
* Animation Scheduler Integration
* Connects animation system with the existing scheduler for optimal frame management
*/
import { Signal } from '../core/signal';
import { Animation, EasingFunction, Interpolator } from './core';
import { Timeline } from './composer';
export interface AnimationManager {
readonly activeAnimations: Signal<Set<string>>;
readonly frameRate: Signal<number>;
readonly register: <T>(animation: Animation<T>) => string;
readonly unregister: (animationId: string) => boolean;
readonly pause: () => void;
readonly resume: () => void;
readonly clear: () => void;
}
export interface ScheduledAnimation<T> extends Animation<T> {
readonly taskId: string | null;
readonly isScheduled: Signal<boolean>;
}
export declare const getGlobalAnimationManager: () => AnimationManager;
export declare const scheduledAnimation: <T>(from: T, to: T, duration: number, interpolator: Interpolator<T>, easing?: EasingFunction) => ScheduledAnimation<T>;
export declare const animate: <T>(from: T, to: T, duration: number, interpolator: Interpolator<T>, easing?: EasingFunction) => ScheduledAnimation<T>;
export declare const scheduledTimeline: () => Timeline & {
readonly register: () => void;
readonly unregister: () => void;
};
export declare const getAnimationStats: () => {
activeCount: number;
frameRate: number;
scheduler: import("../scheduler").SchedulerState;
};
export declare const debugAnimations: () => void;
export declare const profileAnimations: (duration?: number) => () => void;