mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 09:27:49 +01:00
make 30 fps
This commit is contained in:
parent
645c979c18
commit
7147eeb122
1 changed files with 1 additions and 1 deletions
|
@ -1898,7 +1898,7 @@ let lastDrawTime = 0; // Timestamp of the last draw request
|
|||
const loop = () => {
|
||||
const now = performance.now();
|
||||
const elapsed = now - lastDrawTime;
|
||||
if (elapsed >= (1000 / 24)) {
|
||||
if (elapsed >= (1000 / 30)) {
|
||||
lastDrawTime = now;
|
||||
ctx.drawImage(AMvideo, 0, 0, canvas.width, canvas.height);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue