Skip to content

Always run at 60 FPS #3

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

Open
qurben opened this issue Oct 9, 2014 · 1 comment
Open

Always run at 60 FPS #3

qurben opened this issue Oct 9, 2014 · 1 comment

Comments

@qurben
Copy link
Collaborator

qurben commented Oct 9, 2014

I think it would be easier (and maybe better) to just always run the app at 60(ish) FPS, this is what works best with PIXI.

So just

var animate = function() {
    requestAnimFrame(animate);
    renderer.render(stage);
}
requestAnimFrame(animate);

This solves a lot of dependency problems, where every object that updates has to call the animate function in main. I think WebGL is smart enough to just don't go crazy when it isn't needed.

@qurben
Copy link
Collaborator Author

qurben commented Oct 9, 2014

It is a lot less smooth :|

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

No branches or pull requests

1 participant