Skip to main content

animation_curve_optimize

Functions

compute_keyframe_value_effect(key_middle, key_previous, key_next)number

Compute value difference in the curve if the middle key between previous and next is removed

animation_curve_optimize(curve, [error_tolerance])

Will remove keyframes that do not affect shape of the curve significantly. The significance degree is determined by the error tolerance Intended to reduce complexity of a curve to improve performance and lower memory usage

compute_keyframe_value_effect(key_middle, key_previous, key_next) ⇒ number

Compute value difference in the curve if the middle key between previous and next is removed

Kind: global function
Returns: number - value delta if the middle frame is removed

ParamType
key_middleKeyframe
key_previousKeyframe
key_nextKeyframe

animation_curve_optimize(curve, [error_tolerance])

Will remove keyframes that do not affect shape of the curve significantly. The significance degree is determined by the error tolerance Intended to reduce complexity of a curve to improve performance and lower memory usage

Kind: global function

ParamTypeDescription
curveAnimationCurve
[error_tolerance]numberhow much of a loss to accept, this is relative to normalized value bounds of the curve