We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Attached improvements to use of getAnimationFrame as per https://gist.github.com/1002116 ==== Also but not attached, changed the way multiple animations are handled. [snip] function animate(dt) { //loop through renderers for (var i = 0; i < renderers.length; i++) { //if running if (renderers[i].isRunning()) { frame = renderers[i].getCurrentFrame(); renderers[i].draw(frame); frame = (renderers[i].getCurrentFrame() + 1) % renderers[i].getAnimationLength(); renderers[i].setCurrentFrame(frame); } } } [unsnip] [snip] gameTimer = new fpstimer.FPSTimer(25, animate); [unsnip] [snip] require(["json!upload/sheep_right_flower.php"], function (json) { // create renderer var renderer = new renderModule.Renderer(json, { onDone: function(renderer) { sheep_anim = setupAnimation(renderer, fpstimer, "sheep2-wrap"); sheep_anim.start(); gameTimer.start(); } }); }); require(["json!upload/cows.php"], function (json) { // create renderer var renderer = new renderModule.Renderer(json, { onDone: function(renderer) { cows_anim = setupAnimation(renderer, fpstimer, "cows-wrap"); cows_anim.start(); } }); }); require(["json!upload/farmer_win_data.php"], function (json) { // create renderer var renderer = new renderModule.Renderer(json, { onDone: function(renderer) { farmer_win_anim = setupAnimation(renderer, fpstimer, "farmer-win-wrap"); winSound = loadSound("clapp"); } }); });
Original issue reported on code.google.com by [email protected] on 20 Aug 2012 at 11:27
[email protected]
Attachments:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Original issue reported on code.google.com by
[email protected]
on 20 Aug 2012 at 11:27Attachments:
The text was updated successfully, but these errors were encountered: