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

Calling pause does not pause animation. #4

Closed
arlando opened this issue Oct 17, 2015 · 3 comments
Closed

Calling pause does not pause animation. #4

arlando opened this issue Oct 17, 2015 · 3 comments

Comments

@arlando
Copy link

arlando commented Oct 17, 2015

Not sure whats going on but when I call pause:

let r = new Rune;
r.play();
r.on('draw', fc => {
    // Do some wicked animation stuff.
    r.pause();
});

Does not actually stop the 'draw' event. However if I do:

let r = new Rune;
r.play();
r.on('draw', fc => {
  // More wicked...
});
r.pause();

This seems to work.

@runemadsen
Copy link
Owner

Thanks for reporting this. It was a small problem related to requestAnimationframe being renewed before cancelAnimationframe was called, thus cancelling a non-existing frame. I just fixed it, and I'll publish a 0.2.4 release later today. 👍

@runemadsen
Copy link
Owner

0.2.4 has been released!

@arlando
Copy link
Author

arlando commented Oct 18, 2015

Grazie!

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