Type Alias WindArrowLayerOptions
color?: RgbaColor;
colorramp?: ColorRamp;
density?: number;
fastColor?: RgbaColor;
fastSpeedNorm?: number;
id?: string;
maxAmount?: number;
opacity?: number;
refreshInterval?: number;
rttTimestep?: number;
size?: number;
smooth?: boolean;
speed?: number;
}
Properties
Optionalcolor
Optionalcolorramp
Coloramp to use.
Default: VIRIDIS scale from 0 to 40 (speed in m/s)
Optionaldensity
Number of arrows visible per 1000 px^2. Default: 2.
OptionalfastColor
Color of the arrows when fast. RGBA 0-255. Defaults: [255, 255, 255, 192]
OptionalfastSpeedNorm
Normalised wind speed threshold (0–1 relative to the data's max wind speed)
at which the arrow color fully transitions from color to fastColor.
0.5 = blend completes at half of the maximum encoded wind speed.
Default: 0.5
Optionalid
ID of the layer
OptionalmaxAmount
Quantity of arrows to be created.
Has to be a power of 2 and at least 4.
The actual exact number will be arrows * arrows.
Try to keep this value as low as possible to optimize performance.
The number of actually visible arrows is determined by options.density.
Default:128.
Optionalopacity
Opacity of the background in the range [0, 1].
Default: 0.8.
Note: does not affect the opacity of the arrows, this is defined as part of the arrow color (alpha component)
OptionalrefreshInterval
Time interval (in milliseconds) how often the arrows
are refreshed to avoid degradation.
Random 1/4 of the arrows is always randomly reset.
Default value is 800.
OptionalrttTimestep
Max ms between particle simulation steps. Lower = smoother motion; 0 = every frame.
Default: 1000/60 (~60Hz).
Optionalsize
Size of the arrows. Default: 18
Optionalsmooth
Whether or not the colorramp must be smooth
Optionalspeed
Speed factor of the arrows. Defaults: 0.001
Color of the arrows when slow. RGBA 0-255. Defaults:
[255, 255, 255, 192]