UNPKG

@laubloch/scrolly-motion

Version:

Advanced scroll animation library with breakpoint support, timeline presets.

42 lines (41 loc) 1.51 kB
/** * Modular ScrollyMotion Core Class * Implements the API specified in TODO.md: * new ScrollyMotion() - minimal core only * new ScrollyMotion(timeline, physics) - with specific features * new ScrollyMotion(timeline, physics, config) - with configuration */ import type { ScrollyMotionMetrics, TimelineStep } from "../types"; import type { ScrollyMotionPlugin } from "./PluginManager"; import type { ScrollyMotionModule } from "../modules/ModuleInterface"; export declare class ScrollyMotion { private prevScrollY; private ticking; private body; private onResize; private mediaQueries; private modules; private parser; private animation; private themeManager; private elementManager; private eventManager; private pluginManager; constructor(...args: any[]); private parseConstructorArgs; private initializeModules; private hasModule; destroy(): void; init(): void; onScroll(): void; updateScroll(): void; on(eventName: string, handler: (...args: any[]) => void): void; registerPlugin(plugin: ScrollyMotionPlugin): void; initializePresets(customPresets?: Record<string, TimelineStep[]>): Map<string, TimelineStep[]>; getMetrics(): ScrollyMotionMetrics; getModules(): ScrollyMotionModule[]; hasModuleLoaded(moduleName: string): boolean; getElements(): import("../types").ScrollElement[]; getActiveElements(): import("../types").ScrollElement[]; emit(eventName: string, ...args: any[]): void; }