Noise

Noise

A base class for procedural noise functions.
Only used to define the class. Should never be instantiated.

Constructor

new Noise()

Methods

(static) fractal1d(x, scale, octaves, persistance, lacunarity, type) → {Float}

Evaluates a one-dimensional fractal noise function at a specific position.

Parameters:
Name Type Description
x Float

Evaluation position x.

scale Float

Base scale. Greater scale values will pull the sources (hills and valleys) further apart.

octaves Integer

Number of octaves.

persistance Float

Amplitude persistance between octaves.

lacunarity Float

Frequency scale between octaves.

type Noise

Name of noise class extending from Noise.

(static) fractal2d(x, y, scale, octaves, persistance, lacunarity, type) → {Float}

Evaluates a two-dimensional fractal noise function at a specific position.

Parameters:
Name Type Description
x Float

Evaluation position x.

y Float

Evaluation position y.

scale Float

Base scale. Greater scale values will pull the sources (hills and valleys) further apart.

octaves Integer

Number of octaves.

persistance Float

Amplitude persistance between octaves.

lacunarity Float

Frequency scale between octaves.

type Noise

Name of noise class extending from Noise.

(static) fractal3d(x, y, z, scale, octaves, persistance, lacunarity, type) → {Float}

Evaluates a three-dimensional fractal noise function at a specific position.

Parameters:
Name Type Description
x Float

Evaluation position x.

y Float

Evaluation position y.

z Float

Evaluation position z.

scale Float

Base scale. Greater scale values will pull the sources (hills and valleys) further apart.

octaves Integer

Number of octaves.

persistance Float

Amplitude persistance between octaves.

lacunarity Float

Frequency scale between octaves.

type Noise

Name of noise class extending from Noise.

(static) fractal4d(x, y, z, w, scale, octaves, persistance, lacunarity, type) → {Float}

Evaluates a four-dimensional fractal noise function at a specific position.

Parameters:
Name Type Description
x Float

Evaluation position x.

y Float

Evaluation position y.

z Float

Evaluation position z.

w Float

Evaluation position w.

scale Float

Base scale. Greater scale values will pull the sources (hills and valleys) further apart.

octaves Integer

Number of octaves.

persistance Float

Amplitude persistance between octaves.

lacunarity Float

Frequency scale between octaves.

type Noise

Name of noise class extending from Noise.

(static) split(x) → {Object}

Splits a real-valued number into a record for use in smooth interpolation.

Parameters:
Name Type Description
x Float

Input value.