A smooth noise generator for one-dimensional values.

Param: options

Configuration options for the noise process.

Param: options.amplitude

The generated noise will be on the range [0, amplitude].

Param: options.scale

An adjustment factor for the input x values which place them on an appropriate range.

Param: options.maxReferences

The number of pre-generated random numbers to generate.

Accessors

Methods

Accessors

  • get amplitude(): number[]
  • Amplitude of the generated noise output The noise output is multiplied by this value

    Returns number[]

  • get scale(): number[]
  • Scale factor of the random indices

    Returns number[]

Methods

  • Generate the noise value corresponding to a provided numeric x value.

    Parameters

    • x: number

      Any finite number

    Returns number

    The corresponding smoothed noise value