davidfig/pixi-viewport

How to moveCenter with easing?

Closed this issue · 4 comments

I'm using pixi-viewport and pixi-ease in my application and want to ease the camera movement when calling viewport.toCenter(). But how do I do this?

There is Animate plugin, isn't it what you are looking for?

I've just been trying this, but can't get any difference to work. I also can't find much documentation on what .animate is or does. Could you perhaps help me along with this?

I guess that you should just call animate instead of moveCenter()
There is a simple example which moves viewport on click https://codesandbox.io/s/laughing-sound-dqtk7f

Ah right, that works. Thanks! This should really be documented somewhere better in my opinion, but at least it works now