A curve that contains a set of keyframes and can evaluate values at specific timestamps.
// Example of using Animation Curve// creating keyframesvar A = AnimationCurve.createKeyFrame();var B = AnimationCurve.createKeyFrame();// creating AnimationCurvevar curve = AnimationCurve.create();A.time = 0.0;A.value = 0.0;B.time = 1.0;B.value = 1.0;curve.addKeyframe(A);curve.addKeyframe(B);let idxB = curve.addKeyframe(B);// evaluating valuevar value = curve.evaluate(0.5); Copy
// Example of using Animation Curve// creating keyframesvar A = AnimationCurve.createKeyFrame();var B = AnimationCurve.createKeyFrame();// creating AnimationCurvevar curve = AnimationCurve.create();A.time = 0.0;A.value = 0.0;B.time = 1.0;B.value = 1.0;curve.addKeyframe(A);curve.addKeyframe(B);let idxB = curve.addKeyframe(B);// evaluating valuevar value = curve.evaluate(0.5);
Readonly
The number of keyframes in the animation curve.
Adds keyframe to the curve.
Evaluate value of the curve at specific point.
Get an AnimationKeyFrame at the passed in index.
AnimationKeyFrame
Returns the name of this object's type.
Returns true if the object matches or derives from the passed in type.
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
other
Remove animation keyframe at specific timestamp. The closest keyframe will be deleted.
A curve that contains a set of keyframes and can evaluate values at specific timestamps.
Example