Skip to content

Commit

Permalink
Merge pull request #170 from f3z0/master
Browse files Browse the repository at this point in the history
Fixes bug resulting in sprite sheet playback at 2x speed.
  • Loading branch information
cykod committed Jul 23, 2015
2 parents 3842417 + abf7b6b commit c97bbd9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/quintus_anim.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Quintus.Anim = function(Q) {
if(p.animationChanged) {
p.animationChanged = false;
} else {
p.animationTime += dt;
if(p.animationTime > rate) {
stepped = Math.floor(p.animationTime / rate);
p.animationTime -= stepped * rate;
Expand Down Expand Up @@ -135,8 +134,9 @@ Quintus.Anim = function(Q) {
}

startX = curX;
endX = Q.width / scale + p.repeatW;
endY = Q.height / scale + p.repeatH;
endX = Q.width / Math.abs(scale) / Math.abs(p.scale || 1) + p.repeatW;
endY = Q.height / Math.abs(scale) / Math.abs(p.scale || 1) + p.repeatH;

while(curY < endY) {
curX = startX;
while(curX < endX) {
Expand Down

0 comments on commit c97bbd9

Please sign in to comment.