Construct a new noise generator.
The style of noise to generate; either NoiseKind.SPIKY or NoiseKind.SMOOTH.
The seed value; optional. If unspecified, defaults to a random integer.
Example:
const noise = new Noise(NoiseKind.SMOOTH, "someSeed");
The current seed value.
You can freely change this value. If you set it to a string, the string will be hashed into a number using Random.hashStringToNum.
The current seed value.
You can freely change this value. If you set it to a string, the string will be hashed into a number using Random.hashStringToNum.
Using the current seed, get the value at a given 1D position.
The input position.
The output noise value, in the range of 0 to 1, inclusive on both ends.
Using the current seed, get the value at a given 2D position.
The input x position.
The input y position.
The output noise value, in the range of 0 to 1, inclusive on both ends.
Using the current seed, get the value at a given 3D position.
The input x position.
The input y position.
The input z position.
The output noise value, in the range of 0 to 1, inclusive on both ends.
Using the current seed, get the value at a given 4D position.
The input x position.
The input y position.
The input z position.
The input w position.
The output noise value, in the range of 0 to 1, inclusive on both ends.
Using the current seed, get the value at a given 2D position.
The input position.
The output noise value, in the range of 0 to 1, inclusive on both ends.
Using the current seed, get the value at a given 3D position.
The input position.
The output noise value, in the range of 0 to 1, inclusive on both ends.
Using the current seed, get the value at a given 4D position.
The input position.
The output noise value, in the range of 0 to 1, inclusive on both ends.
Generates 1D, 2D, 3D, or 4D noise, as numbers in the range 0 to 1 (inclusive).