segundo
This commit is contained in:
parent
ee4348edae
commit
763e8d35f6
1 changed files with 3 additions and 3 deletions
|
@ -99,9 +99,9 @@
|
|||
let dt = (timestamp - prevTime) / 1000;
|
||||
prevTime = timestamp;
|
||||
|
||||
if (dt < 50) { // fps limiter (20fps)
|
||||
await new Promise(r => setTimeout(r, 50 - dt));
|
||||
dt = 50;
|
||||
if (dt < 0.025) { // fps limiter (40fps)
|
||||
await new Promise(r => setTimeout(r, 0.025 - dt));
|
||||
dt = 0.025;
|
||||
}
|
||||
|
||||
// petting shake
|
||||
|
|
Reference in a new issue