ts-useful
Version:
Functions for animation, color transitions, ecliptic, bezier, decasteljau, curves, three dimensional curves, smooth scrolling, random range, randomItem, mobius index, vectors, physics vectors, and easing.
20 lines (19 loc) • 484 B
TypeScript
export interface ISwipeEvents {
left?: () => void;
right?: () => void;
up?: () => void;
down?: () => void;
}
export declare class Swipe {
private x1;
private y1;
private swipeEvents;
private elm;
private defaultSwipe;
private handleTouchStart;
private handleTouchMove;
private assignSwipe;
Destroy(): void;
SetSwipe(events: ISwipeEvents): void;
constructor(element: HTMLElement, events?: ISwipeEvents);
}