RLottie: Fix animation speed when device limits FPS
This commit is contained in:
parent
e898aa01a7
commit
22cd46f6fc
@ -502,7 +502,7 @@ class RLottie {
|
||||
|
||||
const now = Date.now();
|
||||
const currentSpeed = this.lastRenderAt ? this.msPerFrame / (now - this.lastRenderAt) : 1;
|
||||
const delta = Math.min(1, (this.direction * this.speed) / currentSpeed);
|
||||
const delta = (this.direction * this.speed) / currentSpeed;
|
||||
const expectedNextFrameIndex = Math.round(this.approxFrameIndex + delta);
|
||||
|
||||
this.lastRenderAt = now;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user