vevet
Version:
Vevet is a JavaScript library for creative development that simplifies crafting rich interactions like split text animations, carousels, marquees, preloading, and more.
30 lines (26 loc) • 628 B
text/typescript
export interface ISwipeVec2 {
x: number;
y: number;
}
export interface ISwipeMatrix extends ISwipeVec2 {
angle: number;
}
export interface ISwipeCoords {
/** Event timestamp. */
timestamp: number;
/** Start position. */
start: ISwipeMatrix;
/** Previous position. */
prev: ISwipeMatrix;
/** Current position. */
current: ISwipeMatrix;
/** Movement offset from start. */
diff: ISwipeMatrix;
/** Movement offset from previous position. */
step: ISwipeMatrix;
/** Total accumulated movement. */
accum: ISwipeVec2;
}
export interface ISwipeVelocity extends ISwipeMatrix {
timestamp: number;
}