On this page

Type Alias WindArrowLayerOptions

type 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;
}
Index

Properties

color?: RgbaColor

Color of the arrows when slow. RGBA 0-255. Defaults: [255, 255, 255, 192]

colorramp?: ColorRamp

Coloramp to use. Default: VIRIDIS scale from 0 to 40 (speed in m/s)

density?: number

Number of arrows visible per 1000 px^2. Default: 2.

fastColor?: RgbaColor

Color of the arrows when fast. RGBA 0-255. Defaults: [255, 255, 255, 192]

fastSpeedNorm?: number

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

id?: string

ID of the layer

maxAmount?: number

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.

opacity?: number

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)

refreshInterval?: number

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.

rttTimestep?: number

Max ms between particle simulation steps. Lower = smoother motion; 0 = every frame. Default: 1000/60 (~60Hz).

size?: number

Size of the arrows. Default: 18

smooth?: boolean

Whether or not the colorramp must be smooth

speed?: number

Speed factor of the arrows. Defaults: 0.001

Was this helpful?
SDK JS
Modules
Reference
types
WindArrowLayerOptions