Skip to content

Commit d34a325

Browse files
committed
Init the prevTick to avoid ffwd glitches.
1 parent e588ff5 commit d34a325

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

v3/src/checksum.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
var CHECKSUM = {
2-
build: 'e7a99d10-1a09-11e7-9d35-b9c669b4e95e'
2+
build: '15430db0-1a19-11e7-90e9-c9fa246fdb12'
33
};
44
module.exports = CHECKSUM;

v3/src/components/Animation.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ Animation.prototype = {
9191
this.isPlaying = true;
9292
this.pendingRepeat = false;
9393

94+
this.prevTick = this.parent.state.game.mainloop.lastFrameTimeMs;
95+
9496
return this.parent;
9597
},
9698

@@ -126,7 +128,7 @@ Animation.prototype = {
126128
// TODO: Add value argument
127129
progress: function ()
128130
{
129-
var p = this.currentFrame.index / this.currentAnim.frames.length;
131+
var p = this.currentFrame.progress;
130132

131133
if (!this.forward)
132134
{

0 commit comments

Comments
 (0)