Skip to content

Commit 0dc04c5

Browse files
committed
Fix #7070. Correctly use animation frame duration when it is set.
1 parent b864325 commit 0dc04c5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/animations/Animation.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,8 @@ var Animation = new Class({
361361
{
362362
// When is the first update due?
363363
state.accumulator = 0;
364-
365-
state.nextTick = state.msPerFrame || state.currentFrame.duration;
364+
365+
state.nextTick = state.frameRate === state.currentAnim.frameRate ? state.currentFrame.duration || state.msPerFrame : state.msPerFrame;
366366
},
367367

368368
/**
@@ -515,7 +515,7 @@ var Animation = new Class({
515515
{
516516
state.accumulator -= state.nextTick;
517517

518-
state.nextTick = state.msPerFrame || state.currentFrame.duration;
518+
state.nextTick = state.frameRate === state.currentAnim.frameRate ? state.currentFrame.duration || state.msPerFrame : state.msPerFrame;
519519
},
520520

521521
/**

0 commit comments

Comments
 (0)