@allmaps/render
Version:
Render functions for WebGL and image buffers
28 lines (26 loc) • 1.07 kB
TypeScript
import { FetchableTile } from './FetchableTile.js';
import { CacheableTile } from './CacheableTile.js';
import { FetchFn } from '@allmaps/types';
import { GetImageData } from '../shared/types.js';
/**
* Class for tiles that can be cached, and whose data can be processed to an IntArray.
*/
export declare class CacheableIntArrayTile<D> extends CacheableTile<D> {
getImageData: GetImageData<D>;
constructor(fetchableTile: FetchableTile, getImageData: GetImageData<D>, fetchFn?: FetchFn);
/**
* Fetch the tile and create its IntArray data using the supplied getImageData function.
*
* @returns
*/
fetch(): Promise<D | undefined>;
applySprites(): Promise<void>;
spritesDataToCachedTiles(): never[];
static createFactory<D>(getImageData: GetImageData<D>): (fetchableTile: FetchableTile, fetchFn?: FetchFn) => CacheableIntArrayTile<D>;
}
/**
* Class for tiles that is cached, and whose data has been processed to an IntArray.
*/
export declare class CachedIntArrayTile<D> extends CacheableIntArrayTile<D> {
data: D;
}