A CanvasLayer for displaying visual effects like weather, transitions, flashes, or more.

Hierarchy

  • any
    • WeatherEffects

Properties

weatherEffects: Container

The container in which effects are added.

suppression: Container

The container in which suppression meshed are added.

The inverse occlusion mask filter bound to this container.

effects: Map<string, (ParticleEffect | WeatherShaderEffect)[]> = ...

Array of weather effects linked to this weather container.

A default configuration of the terrain mask that is automatically applied to any shader-based weather effects. This configuration is automatically passed to WeatherShaderEffect#configureTerrainMask upon construction.

A default configuration of the terrain mask that is automatically applied to any shader-based weather effects. This configuration is automatically passed to WeatherShaderEffect#configureTerrainMask upon construction.

#suppressionFilter: VoidFilter

The filter that is needed for suppression if the occlusion filter isn't enabled.

Accessors

  • get elevation(): number
  • The elevation of this object.

    Returns number

    Default

    Infinity
    
  • get sortLayer(): number
  • A key which resolves ties amongst objects at the same elevation of different layers.

    Returns number

    Default

    PrimaryCanvasGroup.SORT_LAYERS.WEATHER
    
  • get sort(): number
  • A key which resolves ties amongst objects at the same elevation within the same layer.

    Returns number

    Default

    0
    
  • get zIndex(): number
  • A key which resolves ties amongst objects at the same elevation within the same layer and same sort.

    Returns number

    Default

    0
    
  • get layerOptions(): any
  • Returns any

    Inherit Doc

Methods

  • Parameters

    • options: any

    Returns Promise<void>

  • Parameters

    • options: any

    Returns Promise<any>

    Inherit Doc

  • Initialize the weather container from a weather config object.

    Parameters

    • Optional weatherEffectsConfig: any

      Weather config object (or null/undefined to clear the container).

    Returns void

  • Clear the weather container.

    Returns void

  • Initialize the inverse occlusion and the void filters.

    Returns void

  • Destroy all effects associated with this weather container.

    Returns void

  • Construct effects according to the weather effects config object.

    Parameters

    • Optional weatherEffectsConfig: any

      Weather config object (or null/undefined to clear the container).

    Returns void

  • Protected

    Set the occlusion uniforms for this weather shader.

    Parameters

    Returns void

  • Protected

    Set the terrain uniforms for this weather shader.

    Parameters

    Returns void