Constructor
new SimplexNoise(seed)
Create a noise object
Parameters:
Name | Type | Default | Description |
---|---|---|---|
seed |
Number | String | Array | null | The seed for the noise (optional) |
Members
falloff
Set the falloff of the noise
falloff
Get the falloff of the noise
max_value
Get the maximum value of the noise
min_value
Get the minimum value of the noise
octaves
Set the number of octaves to use
octaves
Get the number of octaves to use
Methods
noise(x, yopt, zopt, wopt) → {number}
Get the noise value at a given point
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
x |
number | x-coordinate | ||
y |
number |
<optional> |
null | y-coordinate |
z |
number |
<optional> |
null | z-coordinate |
w |
number |
<optional> |
null | w-coordinate |
Returns:
Noise value at the given point in range [-1, 1]
- Type
- number
setDetail(octaves, falloff)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
octaves |
number | 1 | Number of octaves to use |
falloff |
number | 0.5 | Falloff of the noise |