Tween.js how to do a yoyo animation

Hi,

Sorry first for this stupid question but really i don’t sucess to make a simple tween with yoyo on my cube. (i come from Phaser and tween is just a formality)

i have follow the RTFM but i don’t sucess…

Could you tell me where i’m wrong ?

Thanks

Use the tween lib included with threejs

https://jsfiddle.net/26tgaufc/13/

demo1

3 Likes

Hi,

Thanks for your jsfiddle. In fact the libs used in your snippet is the same that i would use : tween.js.

I miss tween.update() in animate (on phaser it’s not necessary) and i success with yoyo.

Thanks

1 Like