@meganetaaan/mouse-follower
Version:
TypeScript library for creating animated sprites that smoothly follow mouse cursor or other targets using physics-based movement
18 lines • 498 B
TypeScript
import type { AnimationsConfig } from "./types.js";
export interface Frame {
sourceX: number;
sourceY: number;
width: number;
height: number;
}
export declare class Animation {
#private;
name: string;
index: number;
isPlaying: boolean;
constructor(config: AnimationsConfig, frameWidth: number, frameHeight: number, defaultInterval?: number);
play(name: string): void;
pause(): void;
getCurrentFrame(): Frame;
}
//# sourceMappingURL=animation.d.ts.map