lovr.math.noise

Returns a 1D, 2D, 3D, or 4D perlin noise value. The number will be between 0 and 1, and it will always be 0.5 when the inputs are integers.

noise = lovr.math.noise(x)

Arguments

NameTypeDescription
xnumberThe x coordinate of the input.

Returns

NameTypeDescription
noisenumberThe noise value, between 0 and 1.

noise = lovr.math.noise(x, y)

Arguments

NameTypeDescription
xnumberThe x coordinate of the input.
ynumberThe y coordinate of the input.

Returns

NameTypeDescription
noisenumberThe noise value, between 0 and 1.

noise = lovr.math.noise(x, y, z)

Arguments

NameTypeDescription
xnumberThe x coordinate of the input.
ynumberThe y coordinate of the input.
znumberThe z coordinate of the input.

Returns

NameTypeDescription
noisenumberThe noise value, between 0 and 1.

noise = lovr.math.noise(x, y, z, w)

Arguments

NameTypeDescription
xnumberThe x coordinate of the input.
ynumberThe y coordinate of the input.
znumberThe z coordinate of the input.
wnumberThe w coordinate of the input.

Returns

NameTypeDescription
noisenumberThe noise value, between 0 and 1.

See also