Merge pull request #2007 from zjx-git/fix/requestAnimationFrame-fallback-timing
Some checks failed
Test Browser / build (20.x) (push) Has been cancelled
Test NodeJS / build (23.x) (push) Has been cancelled

fix: correct requestAnimationFrame fallback timing
This commit is contained in:
Anton Lavrenov
2025-12-18 12:57:22 -05:00
committed by GitHub

View File

@@ -452,7 +452,7 @@ let _isCanvasFarblingActive: boolean | null = null;
const req =
(typeof requestAnimationFrame !== 'undefined' && requestAnimationFrame) ||
function (f) {
setTimeout(f, 60);
setTimeout(f, 16); // 60fps ≈ 16.67ms per frame
};
/**
* @namespace Util