API Documentation

Constructor

new ForgeNoise(seed)

Initializes a noise generator with an optional seed for reproducibility.

Noise Functions

generate2D(x, y)

Generates 2D Perlin noise at (x, y). Returns [-1, 1].

generate3D(x, y, z)

Generates 3D Perlin noise at (x, y, z). Returns [-1, 1].

generateSimplex2D(x, y)

Generates 2D Simplex noise at (x, y). Returns [-1, 1].

generateWorley2D(x, y)

Generates 2D Worley noise at (x, y). Returns [0, ~1.414].

Advanced Functions

warp2D(x, y, options)

Generates 2D warped noise. Options: { warpStrength, warpScale, iterations }. Returns [-1, 1].

generateFractal2D(x, y, options)

Generates 2D fBm noise. Options: { octaves, lacunarity, persistence, scale, normalized, ridged, turbulence }. Returns [-1, 1].

Range Mapping

generate2D01(x, y)

2D Perlin noise mapped to [0, 1].

generateSimplex2D01(x, y)

2D Simplex noise mapped to [0, 1].

generateWorley2D01(x, y)

2D Worley noise mapped to [0, 1].