Sprite animation in a canvas based on a single spritesheet