I have the following situation: a phaser gameworld (many tweens) where i use gsap (2.0 es6). And a surrounding page with some small interactive elements (also using gsap, but not so many tweens/timelines, about 10-15). I would like to be able to pause everything in the game and keep the animation in the page active.
Is it possible to create 2 different gsap (global) instances? So I can pause just the game instance.
That seems the cleanest approach.
Other approaches i tried, but failed so far:
- exportroot (no use, cause i get all tweens, also thje one in the page scope)
- attach the tweens in the game to a global timeline, use this as a sort of proxy/container, but gives unexpected behaviour and also the code becomes less readable
Currently i'm even considering using another animation framework for the in page animation, so I can still use the global pause resume for the game,
this is off course pretty lame...;)
What would be the best approach?