import type { Rect } from '../core/types';
export interface AnimationFrame {
    /** Source rect in the sprite sheet. */
    srcRect: Rect;
    /** Duration of this frame in seconds. */
    duration: number;
    /** Optional event to fire when this frame starts. */
    event?: string;
}
export interface AnimationClip {
    name: string;
    frames: AnimationFrame[];
    loop: boolean;
    /** Playback speed multiplier (default 1). */
    speed: number;
}
export type AnimationEventCallback = (clipName: string, eventName: string) => void;
export type EasingFn = (t: number) => number;
export declare const Easing: {
    readonly linear: (t: number) => number;
    readonly easeInQuad: (t: number) => number;
    readonly easeOutQuad: (t: number) => number;
    readonly easeInOutQuad: (t: number) => number;
    readonly easeInCubic: (t: number) => number;
    readonly easeOutCubic: (t: number) => number;
    readonly easeInOutCubic: (t: number) => number;
    readonly easeOutBounce: (t: number) => number;
    readonly easeOutElastic: (t: number) => number;
};
export declare class SpriteAnimator {
    private clips;
    private currentClip;
    private frameIndex;
    private elapsed;
    private playing;
    private onEvent;
    private finished;
    get isPlaying(): boolean;
    get isFinished(): boolean;
    get currentClipName(): string | null;
    get currentFrameIndex(): number;
    addClip(clip: AnimationClip): void;
    removeClip(name: string): void;
    play(name: string, restart?: boolean): void;
    stop(): void;
    resume(): void;
    setEventCallback(cb: AnimationEventCallback): void;
    getCurrentFrame(): AnimationFrame | null;
    update(dt: number): void;
    private fireEvent;
}
export interface TweenConfig<T extends Record<string, number>> {
    target: T;
    from?: Partial<T>;
    to: Partial<T>;
    duration: number;
    easing?: EasingFn;
    delay?: number;
    onComplete?: () => void;
    onUpdate?: (t: number) => void;
}
export declare class TweenManager {
    private tweens;
    create<T extends Record<string, number>>(config: TweenConfig<T>): void;
    update(dt: number): void;
    clear(): void;
    get count(): number;
}
export interface AnimState {
    name: string;
    clipName: string;
}
export interface AnimTransition {
    from: string;
    to: string;
    condition: () => boolean;
}
export declare class AnimationStateMachine {
    private states;
    private transitions;
    private current;
    private animator;
    constructor(animator: SpriteAnimator);
    addState(name: string, clipName: string): void;
    addTransition(from: string, to: string, condition: () => boolean): void;
    get currentState(): string | null;
    forceState(name: string): void;
    update(): void;
}
export declare function createClipFromSheet(name: string, sheetColumns: number, startIndex: number, frameCount: number, frameWidth: number, frameHeight: number, frameDuration?: number, loop?: boolean): AnimationClip;
