Skip to content

perlin2D

perlin2D(x, y, seed?): number

Defined in: src/modules/noise/noise.ts:247

Perlin gradient noise, 2D. Exactly 0 at every integer lattice point. Gradients are unit-length, so the theoretical peak is sqrt(2)/2 — scaled here so that peak fills [-1, 1]. In practice a wide sweep reaches roughly 0.9, since all four gradients rarely align with the sample at once.

number

number

number = 0

number