Is it another method to make animation

I want to make a animation like CSS3 transition or JQ $.animate().

And is it the only method to do this with the update function?

Every time I use the update function to make some small animation,I found it’s too hard.

So,I want to know it’s another method to make animation just like $.animate()?

jQuery animate creates underlying loop and updates some properties on each call in that loop. Which is essentially same as update method.
Difference is that animate it self has some API around it, and makes it easier to do things by providing some arguments.
You could create some utility global methods to do similar. Or even simple script with some attributes so it is changeable from Editor. And reuse that script all around.

Tweenjs is a useful library for doing smooth animations for objects.

1 Like

Yeah, TweenJS is awesome. I created a little script that uses it here:

(That’s a script from the Flappy Bird game).

Ok,thanks,I just think make a animation with update function is too hard every time.

And,because the playcanvas has no API to do this,so I want to try TweenJS.

Thank you for your answer.

You are so nice.

Thank you so much!

I will try this soon!

Thank you for your demo!

You are so nice!

I will try this soon!

Thank you!