animex
Version:
Modern animation-on-scroll library with optional GSAP support
51 lines (42 loc) • 920 B
TypeScript
export interface AnimeXOptions {
/**
* Offset in pixels before the element comes into view.
* @default 120
*/
offset?: number;
/**
* Default animation duration in milliseconds.
* @default 800
*/
duration?: number;
/**
* Easing function for the animation.
* @default "ease"
*/
easing?: string;
/**
* Whether to animate only once when the element first enters.
* @default false
*/
once?: boolean;
/**
* Delay applied between multiple animated elements.
* @default 0
*/
delay?: number;
/**
* Whether to show outlines on animated elements for debugging.
* @default false
*/
debug?: boolean;
/**
* Use GSAP for animation if available.
* @default false
*/
useGSAP?: boolean;
}
export interface AnimeXInstance {
refresh(): void;
}
export function init(config?: AnimeXOptions): AnimeXInstance;
export function refresh(): void;