From 754047fa07dd440c32cda57862e9e870e6dd010a Mon Sep 17 00:00:00 2001 From: WofWca Date: Fri, 8 Oct 2021 13:38:26 +0800 Subject: [PATCH] fix: `this.delay` not being respected with `nonRealtimeData: true` and when the user calls `render` manually with a custom `time` argument --- smoothie.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smoothie.js b/smoothie.js index 8e2387a..2480b12 100644 --- a/smoothie.js +++ b/smoothie.js @@ -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;