Properly set previousCallLinear value in KeyframeList#getInterpolatedValueForPathPosition(), MASSIVELY increasing performance as the interpolation isn't recalculated all the time
This commit is contained in:
@@ -161,6 +161,8 @@ public class KeyframeList<K extends KeyframeValue> extends ArrayList<Keyframe<K>
|
|||||||
K toApply = (K) first().getValue().newInstance();
|
K toApply = (K) first().getValue().newInstance();
|
||||||
|
|
||||||
if(previousCallLinear != (Boolean)linear) {
|
if(previousCallLinear != (Boolean)linear) {
|
||||||
|
previousCallLinear = linear;
|
||||||
|
|
||||||
interpolation = linear ? new GenericLinearInterpolation<K>() : new GenericSplineInterpolation<K>();
|
interpolation = linear ? new GenericLinearInterpolation<K>() : new GenericSplineInterpolation<K>();
|
||||||
|
|
||||||
for(Keyframe<K> keyframe : this) {
|
for(Keyframe<K> keyframe : this) {
|
||||||
|
|||||||
Reference in New Issue
Block a user