AnimationCurveExtensions¶
Namespace:
SideXP.Core
Extension functions for AnimationCurve instances.
Fields¶
DefaultKeyframe¶
Default Keyframe value.
Methods¶
GetDuration(AnimationCurve)¶
Calculates the duration of an AnimationCurve, using its first and last keyframes on X axis.
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.
Returns
Returns the calculated value range of the AnimationCurve. Note that it will return 0 if the AnimationCurve counts less than 2 keyframes.
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.
GetMinKeyframe(AnimationCurve)¶
Gets the lowest keyframe on Y axis of this AnimationCurve.
GetMaxKeyframe(AnimationCurve)¶
Gets the highest keyframe on Y axis of this AnimationCurve.
GetMinTime(AnimationCurve)¶
Gets the minimum time of this AnimationCurve.
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.
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.
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.
Returns
Returns the found maximum value, or default keyframe's if there's no keyframe on the curve.
Loop(AnimationCurve)¶
Makes this AnimationCurve repeat (loop) before its first frame, and after its last frame.
Returns
Returns the updated input curve.
PingPong(AnimationCurve)¶
Makes this AnimationCurve ping-pong before its first frame, and after its last frame.
Returns
Returns the updated input curve.