Module. Defines a seedable 3D noise function, that is used by variour texture patterns. It is based on THREE.SimplexNoise and THREE.MathUtils.seededRandom.
Function. A 3D noise function. Returns a pseudo-random number ∈ [-1,1] for a point in 3D space. Coordinates x, y and z are multiplied by scale before calculating the noise.
noise( x, y, z, scale=1 )
where:
x
– x coordinate of 3D point (number)y
– y coordinate of 3D point (number)z
– z coordinate of 3D point (number)scale
– scale factor for coordinates (number, default 1)Function. Sets the behavior of the noise function. If the optional seed is an integer number, the next generated pseudo-random numbers are based on this seed. Otherwise the current timestamp is used as a seed to achieve a kind of randomization. The result of the function is the seed.
noiseSeed( )
noiseSeed( seed )
where:
seed
– optional the seed value for next pseudo-random
numbers (integer)