Class: MagoWind

MagoWind(viewer)

MagoWind is a class that creates a wind effect.

Constructor

new MagoWind(viewer)

Creates an instance of MagoWind.
Parameters:
Name Type Description
viewer Cesium.Viewer Cesium Viewer instance
Source:
Example
const windOptions = {
    dimension: dimension, // grid count [x,y]
    levels: levels, // grid altitude [ (altitude of grid[0]), ... ]
    uvws: uvws, // uvw for each grid [ { u:[...], v:[...], w:[...] }, ... ]
    boundary: boundary, // lon lat boundary for grid [ [lon, lat](leftlow), (rightlow), (righthigh), (lefthigh) ]
    textureSize: 512, // particle count = (textureSize * textureSize)
    speedFactor: 500.0, // particle speed factor
    renderingType: 'triangle',  // Rendering Type (one of 'point', 'line', 'triangle')
    point: {
        pointSize: 2,
    },
    triangle: {
        lineWidth: 1000,
    }
}
const magoWind = new MagoWind(viewer);
magoWind.init(options);

Classes

MagoWind

Members

MAX_TRAIL_LENGTH :number

Maximum trail length
Type:
  • number
Source:

MIN_TRAIL_LENGTH :number

Minimum trail length
Type:
  • number
Source:

baseUrl :string

Base URL for loading resources
Type:
  • string
Source:

viewer

Cesium Viewer instance
Source:

Methods

createTexture(options, typedArray) → {Cesium.Texture}

Creates a texture.
Parameters:
Name Type Description
options
typedArray
Source:
Returns:
Type
Cesium.Texture

(async) getPrimitiveCollection() → {Promise.<module:cesium.PrimitiveCollection>}

Returns the primitive collection.
Source:
Returns:
Type
Promise.<module:cesium.PrimitiveCollection>

(async) init(options) → {Promise.<void>}

Initializes the wind effect.
Parameters:
Name Type Description
options
Source:
Returns:
Type
Promise.<void>