weather-te
Version:
A light weather visualization library.
41 lines (40 loc) • 1.48 kB
TypeScript
import { Renderer } from './renderer';
import { TileGraySource } from '../source/tile-gray-source';
import { Units } from './units';
import { GraySource } from '../source/gray-source';
export interface Feather {
lonLat: number[];
worldXYZ: number[];
canvasPosition: number[];
u: number;
v: number;
value: number;
direction: number;
featherId: string;
}
export declare class FeatherRenderer extends Renderer {
source: TileGraySource | GraySource;
protected color: string;
protected pixelInterval: number;
protected pixelSide: number;
protected units: Units;
protected featherArr: Feather[];
protected svgArr: any;
protected iconCache: Record<string, any>;
protected icons: any;
protected computed: boolean;
constructor();
setLayerCanvas(canvas: HTMLCanvasElement): void;
clear(): void;
render(): void;
setConfig(config: any): void;
protected computePosition(): void;
protected computeValue(feather: Feather): void;
protected windValue2svg(value: any): string;
protected windValue2svgByMeter(value: any): string;
protected windValue2svgByKnots(value: any): string;
protected seacurrentsValue2svg(value: any): string;
loadFeather(customAssets: Record<string, string>, iconType: string): void;
prepareFeather(iconType: string): void;
protected drawFeather(ctx: CanvasRenderingContext2D, feather: Feather): void;
}