Skip to content

Commit

Permalink
fix: this.delay not being respected with nonRealtimeData: true
Browse files Browse the repository at this point in the history
and when the user calls `render` manually with a custom `time` argument
  • Loading branch information
WofWca committed Oct 8, 2021
1 parent 1fffdd8 commit 754047f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion smoothie.js
Expand Up @@ -785,7 +785,7 @@
if (this.options.limitFPS > 0 && nowMillis - this.lastRenderTimeMillis < (1000/this.options.limitFPS))
return;

time = time || nowMillis - (this.delay || 0);
time = (time || nowMillis) - (this.delay || 0);

// Round time down to pixel granularity, so motion appears smoother.
time -= time % this.options.millisPerPixel;
Expand Down

0 comments on commit 754047f

Please sign in to comment.