WeatherLayers
DemoIntegrationsDocsStatus
  • Overview
  • WeatherLayers GL
    • Quick Start
    • Layers
      • Particle Layer
      • Raster Layer
      • Contour Layer
      • HighLow Layer
      • Front Layer
      • Grid Layer
      • Data Loading
      • Data Properties
      • Style Properties
    • Controls
      • Legend Control
      • Timeline Control
      • Tooltip Control
      • Attribution Control
      • Logo Control
      • Control
    • Types
    • Functions
    • Data Sources
    • Security
    • Troubleshooting
    • Pricing
    • Changelog
    • Roadmap
  • WeatherLayers Cloud
    • Quick Start
    • Client
    • Types
    • Security
    • Troubleshooting
    • Datasets
    • Pricing
    • Changelog
    • Roadmap
  • Contact
Powered by GitBook
On this page
  • Example
  • Data Properties
  • Style Properties
  1. WeatherLayers GL
  2. Layers

Particle Layer

Last updated 2 months ago

Vector variable rendered as animated particle simulation layer

Example

import { Deck } from '@deck.gl/core';
import { ClipExtension } from '@deck.gl/extensions';
import * as WeatherLayers from 'weatherlayers-gl';

// load data
const image = await WeatherLayers.loadTextureData(url);

const deckgl = new Deck({
  layers: [
    new WeatherLayers.ParticleLayer({
      id: 'particle',
      // data properties
      image: image,
      bounds: [-180, -90, 180, 90],
      extensions: [new ClipExtension()],
      clipBounds: [-181, -85.051129, 181, 85.051129],
    }),
  ],
});

Data Properties

Style Properties

numParticles

Type: number, optional

Default: 5000

Number of the particles. The greater number of particles, the denser particle trails.

maxAge

Type: number, optional

Default: 100

Max age of the particles in frames. The greater max age, the longer particle trails.

speedFactor

Type: number 0-1, optional

Default: 1

Speed factor of the particles. The greater speed factor, the longer particle trails.

width

Type: number, optional

Default: 1

color

Type: color [number, number, number, number?], optional

Default: [255, 255, 255]

palette

Type: color palette text or array, optional

Palette used to interpolate values to colors.

Formats:

See common for all layers.

See common for all layers.

Width of the line. See .

Color of the line. See .

text (string) - see for details

array ([number, PaletteColor][]) - PaletteColor is any object accepted by

Style properties
LineLayer getWidth
LineLayer getColor
Text format
Chroma.js constructor
Particle Layer
Data properties