class EaseFuncFactory
Helpers for creating configurable easing functions.
Syntax
public static class EaseFuncFactory
Methods
View SourceCreatePunch(Int32, Single, Single, Boolean)
Create an easing function that oscillates and fade out.
Declaration
public static EaseFunc CreatePunch(int oscillationCount, float amplitudeDecay, float frequencyDecay, bool alwaysStartPositive = true)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | oscillationCount | The number of times the value will oscillate (half the period).
A negative value will move the value away from the target on its first oscillation. |
System.Single | amplitudeDecay | Rate at which the amplitude of the wave decreases.
|
System.Single | frequencyDecay | Rate at which the frequency of the wave decreases.
Higher values cause a more vigorous initial shake. Values below zero cause the shake to increase in speed over time. |
System.Boolean | alwaysStartPositive | If the curve would start with a negative gradient, invert it. |
Returns
Type | Description |
---|---|
EaseFunc | The easing function. |