I wanted smooth deceleration on rotations using the AnimationFactory class. Unfortunately the interpolate function is private, rather than protected, so I had to duplicate the whole class for my project. So may I suggest either:
- Make the interpolate(…) function protected rather than private so developers can extend it neatly.
- Introduce deceleration for everyone, although this may not suit some users:
AnimationFactory:438
Change
[java]rotations[j] = rot.slerp(((Rotation) keyFrames).rotation, ((Rotation) keyFrames[key]).rotation, val);[/java]
to
[java]rotations[j] = rot.slerp(((Rotation) keyFrames).rotation, ((Rotation) keyFrames[key]).rotation, 1-FastMath.pow(1-val,2));[/java]