Skip to main content

AnimationCurve

Store a collection of Keyframes that can be evaluated over time.

Members

Properties

NameDescription
AnimationCurve.keysAll keys defined in the animation curve.
AnimationCurve.lengthThe number of keys in the curve. (Read Only)
AnimationCurve.postWrapModeThe behaviour of the animation after the last keyframe.
AnimationCurve.preWrapModeThe behaviour of the animation before the first keyframe.

Constructor

NameDescription
[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

NameDescription
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

NameDescription
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.