AnimationCurveUtility¶
Namespace:
SideXP.Core
Miscellaneous functions for working with AnimationCurve instances.
Fields¶
DefaultKeyframe¶
Default Keyframe value.
Properties¶
Linear¶
Creates an AnimationCurve with linear easing.
EaseIn¶
Creates an AnimationCurve with in easing.
EaseOut¶
Creates an AnimationCurve with out easing.
EaseInOut¶
Creates an AnimationCurve with in-out easing.
Methods¶
GetFirstKeyframe(AnimationCurve)¶
Gets the first keyframe on X axis of this AnimationCurve.
Parameters
curve: The curve to process.
Returns
Returns the found keyframe, or the default one if there's no keyframe on the curve.
GetLastKeyframe(AnimationCurve)¶
Gets the last keyframe on X axis of this AnimationCurve.
Parameters
curve: The curve to process.
Returns
Returns the found keyframe, or the default one if there's no keyframe on the curve.
GetMinKeyframe(AnimationCurve)¶
Gets the lowest keyframe on Y axis of this AnimationCurve.
Parameters
curve: The curve to process.
Returns
Returns the found keyframe, or the default one if there's no keyframe on the curve.
GetMaxKeyframe(AnimationCurve)¶
Gets the highest keyframe on Y axis of this AnimationCurve.
Parameters
curve: The curve to process.
Returns
Returns the found keyframe, or the default one if there's no keyframe on the curve.
GetMinTime(AnimationCurve)¶
Gets the minimum time of this AnimationCurve.
Parameters
curve: The curve to process.
Returns
Returns the found minimum time, or default keyframe's if there's no keyframe on the curve.
GetMaxTime(AnimationCurve)¶
Gets the maximum time of this AnimationCurve.
Parameters
curve: The curve to process.
Returns
Returns the found maximum time, or default keyframe's if there's no keyframe on the curve.
GetMinValue(AnimationCurve)¶
Gets the minimum value of this AnimationCurve.
Parameters
curve: The curve to process.
Returns
Returns the found minimum value, or default keyframe's if there's no keyframe on the curve.
GetMaxValue(AnimationCurve)¶
Gets the maximum value of this AnimationCurve.
Parameters
curve: The curve to process.
Returns
Returns the found maximum value, or default keyframe's if there's no keyframe on the curve.
GetDuration(AnimationCurve)¶
Calculates the duration of an AnimationCurve, using its first and last keyframes on X axis.
Parameters
curve: The curve to process.
Returns
Returns the calculated duration of the AnimationCurve. Note that it will return 0 if the AnimationCurve counts less than 2 keyframes.
GetRange(AnimationCurve)¶
Calculates the value range of an AnimationCurve, using its lowest and highest keyframes on Y axis.
Parameters
curve: The curve to process.
Returns
Returns the calculated value range of the AnimationCurve. Note that it will return 0 if the AnimationCurve counts less than 2 keyframes.
Loop(AnimationCurve)¶
Makes this AnimationCurve repeat (loop) before its first frame, and after its last frame.
Parameters
curve: The curve to process.
Returns
Returns the updated input curve.
PingPong(AnimationCurve)¶
Makes this AnimationCurve ping-pong before its first frame, and after its last frame.
Parameters
curve: The curve to process.
Returns
Returns the updated input curve.