vevet
Version:
Vevet is a JavaScript library for creative development that simplifies crafting rich interactions like split text animations, carousels, marquees, preloading, and more.
27 lines • 820 B
TypeScript
import { ISwipeMatrix, ISwipeVelocity } from '../global';
import type { Swipe } from '..';
export declare class SwipeInertia {
private _ctx;
constructor(_ctx: Swipe);
/** Inertia animation */
private _timeline?;
/** Velocity tracking */
private _velocities;
/**
* Add new velocity sample
*/
addVelocity(velocity: ISwipeVelocity): void;
/** Update last timestamp */
updateLastTimestamp(): void;
/** Returns current velocity */
get velocity(): ISwipeMatrix;
/** Check if inertia is active */
get has(): boolean;
/** Apply inertia-based movement */
release(onUpdate: (matrix: ISwipeMatrix) => void): void;
/** Destroy inertia animation */
cancel(): void;
/** Destroy instance */
destroy(): void;
}
//# sourceMappingURL=index.d.ts.map