Noise
static class Noiseimport Noise from Wax;Deterministic gradient noise and unnormalized octave sums. Coordinates are sampled on an integer lattice; finite coordinate floors must fit int32. These functions are useful for procedural variation, not cryptographic randomness.
Inherits from object. Follow these links for inherited members.
Members
Fademethod
public static fn Fade(float t) : floatEvaluates the quintic 6t^5 - 15t^4 + 10*t^3 without clamping t.
Hashmethod
public static fn Hash(int32 x) : int32Mixes one integer coordinate into a deterministic 32-bit pattern.
Hash2method
public static fn Hash2(int32 x, int32 y) : int32Mixes two integer coordinates into a deterministic 32-bit pattern.
Hash3method
public static fn Hash3(int32 x, int32 y, int32 z) : int32Mixes three integer coordinates into a deterministic 32-bit pattern.
Grad2method
public static fn Grad2(int32 hash, float x, float y) : floatSelects a 2D gradient from hash bits and returns its dot product with the supplied displacement.
Grad3method
public static fn Grad3(int32 hash, float x, float y, float z) : floatSelects a 3D gradient from hash bits and returns its dot product with the supplied displacement.
Perlin2Dmethod
public static fn Perlin2D(float x, float y) : floatSamples smoothly interpolated 2D gradient noise. Supply finite coordinates whose floors fit int32; invalid coordinates panic during lattice conversion.
Perlin3Dmethod
public static fn Perlin3D(float x, float y, float z) : floatSamples smoothly interpolated 3D gradient noise. Supply finite coordinates whose floors fit int32; invalid coordinates panic during lattice conversion.
FBM2Dmethod
public static fn FBM2D(float x, float y, int32 octaves, float lacunarity, float gain) : floatSums octaves of 2D Perlin noise. Frequency starts at 1 and multiplies by lacunarity;
amplitude starts at 1 and multiplies by gain. The sum is not normalized, and nonpositive
octaves return zero. Every sampled coordinate must meet Perlin2D bounds.
FBM3Dmethod
public static fn FBM3D(float x, float y, float z, int32 octaves, float lacunarity, float gain) : floatSums octaves of 3D Perlin noise. Frequency starts at 1 and multiplies by lacunarity;
amplitude starts at 1 and multiplies by gain. The sum is not normalized, and nonpositive
octaves return zero. Every sampled coordinate must meet Perlin3D bounds.