Interfaces
ISwipeVec2
interface ISwipeVec2 {
x: number;
y: number;
}
ISwipeCanMoveArg
interface ISwipeCanMoveArg {
type: 'touch' | 'mouse';
matrix: ISwipeMatrix;
start: ISwipeVec2;
diff: ISwipeVec2;
}
ISwipeMatrix
interface ISwipeMatrix {
x: number; // pixels
y: number; // pixels
angle: number; // degrees
}
ISwipeVelocity
interface ISwipeVelocity {
x: number; // pixels
y: number; // pixels
angle: number; // degrees
timestamp: number;
}
ISwipeCoords
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;
}