Skip to content

Instantly share code, notes, and snippets.

@tyaslab
Created May 9, 2016 06:33
Show Gist options
  • Save tyaslab/0df525845af73cc0e278fda3f50cbb13 to your computer and use it in GitHub Desktop.
Save tyaslab/0df525845af73cc0e278fda3f50cbb13 to your computer and use it in GitHub Desktop.
Manual Loop with Euclidean Division
var totalNumberOfFrame - 4;
var frameNumber = 0;
setInterval(function() {
gameFramework.setFrame("sprite1", frameNumber, 64);
frameNumber = (frameNumber + 1) % totalNumberOfFrame;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment