react-native-thanos-snap-animation
Version:
implement Thanos dust animation into react native
17 lines • 733 B
TypeScript
import Canvas from 'react-native-canvas';
export default class FileHelper {
static base64File: (url: string) => Promise<string>;
/**
* Use canvas context to fetch image data, really slow
* @param canvas {Canvas}
* @returns {number[]} the array of pixel rgba [r0, g0, b0, a0, r1, g1, b1, a1, ...]
*/
static getCanvasImageData: (canvas: Canvas) => Promise<number[]>;
/**
* Use base64 image to fetch image data, fast
* @param imgBase64 {string} base64 string of view snapshot
* @returns {number[]} the array of pixel rgba [r0, g0, b0, a0, r1, g1, b1, a1, ...]
*/
static base64PNGToByteArray: (imgBase64: string) => Promise<number[]>;
}
//# sourceMappingURL=FileHelper.d.ts.map