On this page

Type Alias WindLayerOptions

type WindLayerOptions = {
    color?: RgbaColor;
    colorMaxKph?: number;
    colorMinKph?: number;
    colorramp?: ColorRamp;
    density?: number;
    fadeFactor?: number;
    fastColor?: RgbaColor;
    fastIsLarger?: boolean;
    fastSpeed?: number;
    id?: string;
    maxAmount?: number;
    opacity?: number;
    pixelRatio?: number;
    refreshInterval?: number;
    renderTrails?: boolean;
    size?: number;
    smooth?: boolean;
    speed?: number;
}
Index

Properties

color?: RgbaColor

Color of the particle. RGBA 0-255. Defaults to [255, 255, 255, 192]

colorMaxKph?: number

Wind speed (km/h) at or above which particles use fastColor. Converted to m/s internally. Default: 144 (equivalent to 40 m/s, previous default ramp top).

colorMinKph?: number

Wind speed (km/h) at or below which particles use color. Must be >= 0. Converted to m/s internally for the particle field. Default: 0.

colorramp?: ColorRamp

Colormap to use

density?: number

Number of particles visible per 1000 px^2. Default is 2.

fadeFactor?: number

How much the particles fade over time. Default value is 0.1.

fastColor?: RgbaColor

Color of the particle when moving "fast". RGBA 0-255. Defaults to color

fastIsLarger?: boolean

If this is true, the particles gets slighly larger as they become faster. Default: false

fastSpeed?: number

What is considered "fast" (in px/sec) for coloring purposes. Only makes sense when fastColor is used.

id?: string

ID of the layer

maxAmount?: number

Quantity of particles to be created. Default value is 128. Has to be a power of 2 and at least 4. The actual exact number will be particles * particles. Try to keep this value as low as possible to optimize performance.

The number of actually visible particles is determined by density.

opacity?: number

Opacity of the layer in [0, 1]

pixelRatio?: number

Use more pixels to make particles more smooth (especially when tilted). Defaults to 2 for normal displays and 1 for HiDPI displays.

refreshInterval?: number

Time interval (in milliseconds) how often the particles are refreshed to avoid degradation. Random 1/16 of the particles is always randomly reset. Default value is 800.

renderTrails?: boolean

Whether or not the particles render trails. Default: true

size?: number

Size of the particle. Defaults to 1.5

smooth?: boolean

Whether or not the colorramp shows interpolated colors

speed?: number

Speed factor of the particles. Defaults to 0.001

Was this helpful?
SDK JS
Modules
Reference
types
WindLayerOptions