Constructor
new Shake(delta, frequency, duration) → {Shake}
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 Shake instance
- Type
- Shake
Extends
Methods
_nextDampedHarmonic() → {float}
Internal method to return the next dampened cosine value
- Inherited From:
- Source:
Returns:
the next dampened cosine value
- Type
- float
_nextValue() → {float}
Returns the next oscillation magnitude with random sign
- Source:
Returns:
fx - next oscillation magnitude with random sign
- Type
- float
done() → {boolean}
Returns if the Oscillation has completed
- Inherited From:
- Source:
Returns:
if duration of this Oscillation has been reached
- Type
- boolean
getNext() → {float}
Returns the next amplitude for this OScillation
- Inherited From:
- Source:
Returns:
the next amplitude for this Oscillation
- Type
- float
reStart()
Restarts this Oscillation
- Inherited From:
- Source: