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 betweenprevious
andnext
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
Param | Type |
---|---|
key_middle | Keyframe |
key_previous | Keyframe |
key_next | Keyframe |
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
Param | Type | Description |
---|---|---|
curve | AnimationCurve | |
[error_tolerance] | number | how much of a loss to accept, this is relative to normalized value bounds of the curve |