pixi-viewport icon indicating copy to clipboard operation
pixi-viewport copied to clipboard

[Question] 'Emergency' stop? And disable interaction?

Open bencresty opened this issue 3 years ago • 3 comments

Hi, sorry for opening so many issues here lately, but I have one question still; when animating the viewport from own code with gsap I want to break all currently running interactions and animations when that's starting to prevent conflicts. I did a walk through the methods, but can't find such a thing. so...

  1. How can we break all interactions and animations?
  2. Is there a way to (temporary) disable user interactions?

It would be very nice if that would be possible! Thanks in advance!

bencresty avatar Feb 08 '22 21:02 bencresty

Viewport.pause = true should do it.

davidfig avatar Feb 09 '22 04:02 davidfig

That looks great, but when setting pause to false again it's continuing the animation. What I'm looking for is a complete cancel. Is that possible?

bencresty avatar Feb 09 '22 09:02 bencresty

I don't think we built logic to cancel the animations. You'll have to do that manually. (Feel free to submit a PR if you can generalize it.)

davidfig avatar Feb 09 '22 11:02 davidfig