rs-react-native-image-gallery
Version:
React Native Image Gallery with Thumbnails
30 lines • 1.22 kB
TypeScript
import { type NativeTouchEvent } from 'react-native';
/**
* Calculate squared distance between two points
* @param a First coordinate
* @param b Second coordinate
*/
export declare const pow2abs: (a: number, b: number) => number;
/**
* Get distance between two touch points
* @param touches Array of touch events
*/
export declare const getDistance: (touches: Array<NativeTouchEvent>) => number;
/**
* Memoized version of getDistance - caches results for better performance
* Only use this when you expect the same touch points to be calculated repeatedly
* @param touches Array of touch events
*/
export declare const getMemoizedDistance: (touches: Array<NativeTouchEvent>) => number;
/**
* Calculate scale based on distance ratio with a multiplier
* @param currentDistance Current distance between touch points
* @param initialDistance Initial distance between touch points
*/
export declare const getScale: (currentDistance: number, initialDistance: number) => number;
/**
* Pre-loads images to avoid spinner issues
* @param urls Array of image URLs to preload (only URLs are supported for prefetch)
*/
export declare const preLoadImages: (urls: string[]) => void;
//# sourceMappingURL=_helpers.d.ts.map