-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
area: performanceissues with performance in particular targetsissues with performance in particular targetskind: bugSomething isn't workingSomething isn't working
Description
🐛 Bug Report
Possible infinite loop in FrameLoop.ts update method on low end machines 📠
In this part of the code (line 74):
if (time > lastTime + 64) lastTime = time; // http://gafferongames.com/game-physics/fix-your-timestep/
let numSteps = Math.floor(time - lastTime);
What happens is when the delta time between two frames is longer than 64 ms numSteps will become 0 and the animation won't move forward, causing it to get stuck
To Reproduce
Steps to reproduce the behavior:
Start a low end machine on vm where delta time between frames gets longer than 64 ms. Alternatively force the numSteps to always be zero.
Expected behavior
Animations do not get stuck on low frame rate
Link to repro (highly encouraged)
https://codesandbox.io/s/fervent-carson-n4m3p
Environment
react-springv8.0.23reactv16.8.6
Fix
Remove the line 74: if (time > lastTime + 64) lastTime = time;
kallja, kirstu, robinstaudinger, Dhude, axelauvinen and 4 more
Metadata
Metadata
Assignees
Labels
area: performanceissues with performance in particular targetsissues with performance in particular targetskind: bugSomething isn't workingSomething isn't working