Constructor
new Noise(amp, scl, randFunc)
Create a new Noise class.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
amp | number | 1 | The amplitude of the noise. |
scl | number | 0.05 | The scale of the noise. |
randFunc | function | Math.random | The random function used for generating the noise. For seeded noise, where srand is an HB.Math.SeededRandom instance, use '() => { srand.value(); }'. |
Methods
value(x) → {number}
Get the noise value at a specific value.
Parameters:
| Name | Type | Description |
|---|---|---|
x | number | The value. |
Returns:
- Type:
- number