AnimationCurve
Store a collection of Keyframes that can be evaluated over time.
Members
Properties
Name | Description |
---|---|
AnimationCurve .keys | All keys defined in the animation curve. |
AnimationCurve .length | The number of keys in the curve. (Read Only) |
AnimationCurve .postWrapMode | The behaviour of the animation after the last keyframe. |
AnimationCurve .preWrapMode | The behaviour of the animation before the first keyframe. |
Constructor
Name | Description |
---|---|
[AnimationCurve(keys[]) ](./AnimationCurve Constructor.md) | Creates an animation curve from an arbitrary number of keyframes. |
[AnimationCurve() ](./AnimationCurve Constructor.md) | Creates an empty animation curve. |
Methods
Name | Description |
---|---|
AnimationCurve .AddKey(time, value) | Add a new key to the curve. |
AnimationCurve .AddKey(key) | Add a new key to the curve. |
AnimationCurve .Evaluate(time) | Evaluate the curve at time . |
AnimationCurve .MoveKey(index, key) | Removes the keyframe at index and inserts key. |
AnimationCurve .RemoveKey(index) | Removes a key. |
AnimationCurve .SmoothTangents(index, weight) | Smooth the in and out tangents of the keyframe at index. A weight of 0 evens out tangents. |
Static Methods
Name | Description |
---|---|
AnimationCurve .Constant(timeStart, timeEnd, value) | Creates a constant "curve" starting at timeStart, ending at timeEnd and with the value value. |
AnimationCurve .EaseInOut(timeStart, valueStart, timeEnd, valueEnd) | Creates an ease-in and out curve starting at timeStart, valueStart and ending at timeEnd, valueEnd. |
AnimationCurve .Linear(timeStart, valueStart, timeEnd, valueEnd) | A straight Line starting at timeStart, valueStart and ending at timeEnd, valueEnd. |