Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can cancel random requestAnimFrame() calback on hide()/pause() #15

Open
RomanLut opened this issue May 18, 2017 · 1 comment
Open

can cancel random requestAnimFrame() calback on hide()/pause() #15

RomanLut opened this issue May 18, 2017 · 1 comment

Comments

@RomanLut
Copy link

frameID is assigned setTimeout() handle in requestRender() and then
cancelAnimationFrame(frameID) is called in pause().

Handles from setTimeout() should not be used with cancelAnimationFrame().

In my case, where I created and hided FPSMetter at game start, it killed PIXI's requestAnimationFrame callback sometimes. Chances to get handles with same value from setTimeout() and requestAnimationFrame() are high at application start.

@ZumiKua
Copy link

ZumiKua commented Aug 4, 2018

Same issues here, when using this with PIXI, PIXI.ticker.shared's _tick callback is canceled because of this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants