@allmaps/render
Version:
Render functions for WebGL and image buffers
27 lines (25 loc) • 1.17 kB
TypeScript
import { Remote as ComlinkRemote } from 'comlink';
import { FetchableTile } from './FetchableTile.js';
import { CacheableTile } from './CacheableTile.js';
import { FetchAndGetImageDataWorkerType } from '../workers/fetch-and-get-image-data.js';
import { FetchFn } from '@allmaps/types';
/**
* Class for tiles that can be cached, and whose data can be processed to its imageData using a WebWorker.
*/
export declare class CacheableWorkerImageDataTile extends CacheableTile<ImageData> {
#private;
constructor(fetchableTile: FetchableTile, worker: ComlinkRemote<FetchAndGetImageDataWorkerType>, fetchFn?: FetchFn);
/**
* Fetch the tile and create its ImageData using a WebWorker.
*
* @returns
*/
fetch(): Promise<ImageData | undefined>;
static createFactory(worker: ComlinkRemote<FetchAndGetImageDataWorkerType>): (fetchableTile: FetchableTile, fetchFn?: FetchFn) => CacheableWorkerImageDataTile;
}
/**
* Class for tiles that is cached, and whose data has been processed to an ImageData object using a WebWorker.
*/
export declare class CachedWorkerImageDataTile extends CacheableWorkerImageDataTile {
data: ImageData;
}