Simple animation, like css transition

Hey, I’ve tried to google but didn’t really find any simple example for basic animation like moving object from A to B with easing. Is there any way to do it with jme?

1 Like

Unfortunately the wiki currently is responding with 404 not found, but I think you are looking for Cinematics jmonkeyengine/ at master · jMonkeyEngine/jmonkeyengine · GitHub

There’s a scenegraph for dummies link in the header, too. Excuse the name, it’s just a quick recite of the scene graph.

I saw somebody also referred to Cinematics, but I cannot find any method to set custom easing function, for example one from

Using lemur for quite a few things may help here. It is technically a GUI library, but it’s actually more of an engine extension tbh.

I have linked you to animation tweens.

Thanks, I will take a look

Here was a thread on Lemur animation when I first put it in… it works for 2D and 3D stuff.

I guess I never made an actual demo for it but I should:

Ok, I didn’t find what i wanted, so I spent some time and prepared this small library, maybe someone will find it useful GitHub - wizzardo/jme-transition: Small library for smooth transitions in jME
any contribution is welcome =)



Weird… because Lemur’s animation system would have done exactly this.

I don’t see a way to set custom easing curve in Lemur’s animations, and it looks not so easy to extend

Built in easy:

Or you can just implement the Tween interface to provide your own.

And you can even look at the existing ones to see how they work, starting here:

…though if I used smooth step it would look very much like what you have.

Two built-in ease functions are not enough, I implemented all the curves from and it’s very easy to add more. Tween interface is too high-level, and If I use it I will need to implement interpolation and easing

Yes, well it’s easy to write more.

It seems like your easing function is the same as the CurveFunction I referenced earlier… so I don’t really know what you are talking about:
public interface EasingFunction {
float ease(float progress);

private static interface CurveFunction {
public double curve( double input );

Cutting and pasting the private Curve tween was all that was needed (and it’s only an oversight on my part that it’s not already public).

But I’m glad you got your custom approach working. It seems more limited in its application as compared to Lemur but you probably didn’t need to easy “everything” like Lemur is able to do.