Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WaterDropDataGenerator

Water drop data generator. Generates grid of data containing "water drops", which are like spots of more exposed area in the generated heat map data. Generated data range depends on the WaterDropDataOptions.

To create a new instance of Water drop data generator use createWaterDropDataGenerator factory.

Hierarchy

  • WaterDropDataGenerator

Index

Constructors

constructor

Properties

Readonly options

Methods

generate

  • Generate WaterDropData asynchronously.

    NOTE: WaterDropData doesn't support the use of a DataHost and as such doesn't provide method to stream the data. Instead the data is all provided at the same time as a Promise.

    Returns Promise<WaterDropData>

setColumns

  • Returns a new Data generator with the new columns amount.

    Parameters

    • columns: number

      Columns amount

    Returns WaterDropDataGenerator

setOffsetLevel

  • Returns a new Data generator with the new offsetLevel.

    Parameters

    • offsetLevel: number

      Offset level (mid-Y)

    Returns WaterDropDataGenerator

setRows

  • Returns a new Data generator with the new rows amount.

    Parameters

    • rows: number

      Rows amount

    Returns WaterDropDataGenerator

setVolatility

  • Returns a new Data generator with the new volatility.

    Parameters

    • volatility: number

      Volatility, set larger number to generate more waves for each drop

    Returns WaterDropDataGenerator

setWaterDrops

  • setWaterDrops(waterDrops: Array<{ amplitude: number; columnNormalized: number; rowNormalized: number }>): WaterDropDataGenerator
  • Returns a new Data generator with the new rows amount.

    Parameters

    • waterDrops: Array<{ amplitude: number; columnNormalized: number; rowNormalized: number }>

      Water drops configuration. Normalized parameters in range [0, 1]

    Returns WaterDropDataGenerator