UNPKG

@allmaps/render

Version:

Render functions for WebGL and image buffers

25 lines (23 loc) 968 B
import { FetchableTile } from './FetchableTile.js'; import { CacheableTile } from './CacheableTile.js'; import { FetchFn } from '@allmaps/types'; /** * Class for tiles that can be cached, and whose data can be processed to its imageBitmap using a WebWorker. */ export declare class CacheableWorkerImageBitmapTile extends CacheableTile<ImageBitmap> { #private; constructor(fetchableTile: FetchableTile, worker: Worker, fetchFn?: FetchFn); /** * Fetch the tile and create its ImageBitmap using a WebWorker. * * @returns */ fetch(): Promise<ImageBitmap | undefined>; static createFactory(worker: Worker): (fetchableTile: FetchableTile, fetchFn?: FetchFn) => CacheableWorkerImageBitmapTile; } /** * Class for tiles that is cached, and whose data has been processed to an ImageBitmap object using a WebWorker. */ export declare class CachedWorkerImageBitmapTile extends CacheableWorkerImageBitmapTile { data: ImageBitmap; }