Skip to content

Conversation

@8Keep
Copy link
Contributor

@8Keep 8Keep commented Sep 3, 2020

The inputs supplied to InOut were unused, previously it always used the Quad ease functions declared earlier in the file.

Copy link
Member

@MeFisto94 MeFisto94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great spot! That's a big oversight.
This will affect

//Time Interpolators
public static class TimeInterpolator extends AnimInterpolator<Float> {
private EaseFunction ease;
public TimeInterpolator(EaseFunction ease) {
this.ease = ease;
}
@Override
public Float interpolate(float t, int currentIndex, TrackDataReader<Float> data, TrackTimeReader times, Float store) {
return ease.apply(t);
}
}
//in
public static final TimeInterpolator easeInQuad = new TimeInterpolator(Easing.inQuad);
public static final TimeInterpolator easeInCubic = new TimeInterpolator(Easing.inCubic);
public static final TimeInterpolator easeInQuart = new TimeInterpolator(Easing.inQuart);
public static final TimeInterpolator easeInQuint = new TimeInterpolator(Easing.inQuint);
public static final TimeInterpolator easeInBounce = new TimeInterpolator(Easing.inBounce);
public static final TimeInterpolator easeInElastic = new TimeInterpolator(Easing.inElastic);
//out
public static final TimeInterpolator easeOutQuad = new TimeInterpolator(Easing.outQuad);
public static final TimeInterpolator easeOutCubic = new TimeInterpolator(Easing.outCubic);
public static final TimeInterpolator easeOutQuart = new TimeInterpolator(Easing.outQuart);
public static final TimeInterpolator easeOutQuint = new TimeInterpolator(Easing.outQuint);
public static final TimeInterpolator easeOutBounce = new TimeInterpolator(Easing.outBounce);
public static final TimeInterpolator easeOutElastic = new TimeInterpolator(Easing.outElastic);
//inout
public static final TimeInterpolator easeInOutQuad = new TimeInterpolator(Easing.inOutQuad);
public static final TimeInterpolator easeInOutCubic = new TimeInterpolator(Easing.inOutCubic);
public static final TimeInterpolator easeInOutQuart = new TimeInterpolator(Easing.inOutQuart);
public static final TimeInterpolator easeInOutQuint = new TimeInterpolator(Easing.inOutQuint);
public static final TimeInterpolator easeInOutBounce = new TimeInterpolator(Easing.inOutBounce);
public static final TimeInterpolator easeInOutElastic = new TimeInterpolator(Easing.inOutElastic);
//extra
public static final TimeInterpolator smoothStep = new TimeInterpolator(Easing.smoothStep);
public static final TimeInterpolator smootherStep = new TimeInterpolator(Easing.smootherStep);
public static final TimeInterpolator constant = new TimeInterpolator(Easing.constant);

Which means the new animation system was kind of broken in that regard.
Is this worth backporting to 3.3? I guess we won't really do another 3.3 release, though.

@MeFisto94 MeFisto94 merged commit 429c267 into jMonkeyEngine:master Sep 5, 2020
@stephengold
Copy link
Member

A 3.3.3 release is still possible, though I don't think this PR would be eligible for inclusion in it. To me, this looks like a reason to cut 3.4-alpha sooner rather than later.

@stephengold stephengold added this to the v3.4.0 milestone Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants