Constructor
new Oscillate(delta, frequency, duration) → {Oscillate}
Parameters:
| Name | Type | Description |
|---|---|---|
delta |
float | the maximum magnitude of the oscillation |
frequency |
float | the frequency of the oscillation in revolutions per cycle |
duration |
integer | the number of cycles the oscillation should take |
- Source:
Returns:
a new Oscillate instance
- Type
- Oscillate
Methods
_nextDampedHarmonic() → {float}
Internal method to return the next dampened cosine value
- Source:
Returns:
the next dampened cosine value
- Type
- float
done() → {boolean}
Returns if the Oscillation has completed
- Source:
Returns:
if duration of this Oscillation has been reached
- Type
- boolean
getNext() → {float}
Returns the next amplitude for this Oscillation
- Source:
Returns:
the next amplitude for this Oscillation
- Type
- float
reStart()
Restarts this Oscillation
- Source: