Reference noiseDetail()

noiseDetail()

Adjusts the character of the noise produced by the noise() function.

Perlin noise values are created by adding layers of noise together. The noise layers, called octaves, are similar to harmonics in music. Lower octaves contribute more to the output signal. They define the overall intensity of the noise. Higher octaves create finer-grained details.

By default, noise values are created by combining four octaves. Each higher octave contributes half as much (50% less) compared to its predecessor. noiseDetail() changes the number of octaves and the falloff amount. For example, calling noiseDetail(6, 0.25) ensures that noise() will use six octaves. Each higher octave will contribute 25% as much (75% less) compared to its predecessor. Falloff values between 0 and 1 are valid. However, falloff values greater than 0.5 might result in noise values greater than 1.

Examples

Syntax

noiseDetail(lod, falloff)

Parameters

lod
Number:

number of octaves to be used by the noise.

falloff
Number:

falloff factor for each octave.

Notice any errors or typos? Please let us know. Please feel free to edit src/math/noise.js and open a pull request!

Related References