UNPKG

@allmaps/render

Version:

Render functions for WebGL and image buffers

44 lines (42 loc) 1.52 kB
import { WarpedMapWithImage } from '../maps/WarpedMap.js'; import { Tile, Size } from '@allmaps/types'; import { FetchableTileOptions, Sprite } from '../shared/types.js'; /** * Class for tiles that can be fetched. */ export declare class FetchableTile { readonly mapId: string; readonly tile: Tile; readonly tileUrl: string; readonly tileKey: string; readonly fetchableTileKey: string; readonly options?: Partial<FetchableTileOptions>; /** * Creates an instance of FetchableTile. * * @constructor * @param tile - the tile * @param mapId - Map ID * @param tileUrl - Tile URL * @param imageRequest - Image Request * @param options - FetchableTileOptions */ constructor(tile: Tile, mapId: string, tileUrl: string, options?: Partial<FetchableTileOptions>); /** * Creates an instance of FetchableTile from a WarpedMap. * * @constructor * @param tile - the tile * @param warpedMap - A WarpedMap with fetched image */ static fromWarpedMap(tile: Tile, warpedMap: WarpedMapWithImage, options?: Partial<FetchableTileOptions>): FetchableTile; /** * Creates an instance of FetchableTile from a sprite. * * @constructor * @param sprite - Sprite * @param imageSize - imageSize * @param warpedMap - A WarpedMap with fetched image */ static fromSprite(sprite: Sprite, imageSize: Size, warpedMap: WarpedMapWithImage, options?: Partial<FetchableTileOptions>): FetchableTile; }