Skip to main content

Noise

ImprovedNoise​

const noise = new ImprovedNoise(new LegacyRandom(BigInt(6203)))
const value = noise.sample(x / 32, y / 32, 0)
Improved (loading)

PerlinNoise​

const noise = new PerlinNoise(new LegacyRandom(BigInt(6203)), -6, [1, 1])
const value = noise.sample(x, y, 0)
Perlin -6, [1, 1] (loading)
Perlin -5, [1, 1, 1, 1] (loading)
Perlin -5, [1, 0, 2, 3] (loading)
Perlin -4, [1, 1] (loading)

NormalNoise​

const params = { firstOctave: -6, amplitudes: [1, 1] }
const noise = new NormalNoise(new LegacyRandom(BigInt(6203)), params)
const value = noise.sample(x, y, 0)
Normal -6, [1, 1] (loading)
Normal -5, [1, 1] (loading)
Normal -5, [1, 1, 1, 1] (loading)

BlendedNoise​

const noise = new BlendedNoise(new LegacyRandom(BigInt(6203)), 1, 1, 80, 160, 4)
const value = noise.sample(x, y, 0)
Blended (loading)

SimplexNoise​

Simplex (loading)

PerlinSimplexNoise​

PerlinSimplex [-3, -2, -1] (loading)