Options
All
  • Public
  • Public/Protected
  • All
Menu

A smooth noise generator for one-dimensional values.

param options

Configuration options for the noise process.

param [options.amplitude=1]

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

param [options.scale=1]

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

param [options.maxReferences=256]

The number of pre-generated random numbers to generate.

Hierarchy

  • SmoothNoise

Index

Constructors

Accessors

Properties

Methods

Constructors

  • new SmoothNoise(__namedParameters?: { amplitude: number; scale: number; maxReferences: number }): SmoothNoise
  • Parameters

    • __namedParameters: { amplitude: number; scale: number; maxReferences: number } = {}
      • amplitude: number
      • scale: number
      • maxReferences: number

    Returns SmoothNoise

Accessors

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

    Returns number[]

  • Amplitude of the generated noise output The noise output is multiplied by this value

    Parameters

    • amplitude: number[]

    Returns void

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

    Returns number[]

  • Scale factor of the random indices

    Parameters

    • scale: number[]

    Returns void

Properties

_amplitude: any
_scale: any

Methods

  • generate(x: number): number
  • Generate the noise value corresponding to a provided numeric x value.

    Parameters

    • x: number

      Any finite number

    Returns number

    The corresponding smoothed noise value