From: Ruben Beltran del Rio Date: Mon, 9 Sep 2024 20:12:38 +0000 (+0200) Subject: Add control X-Git-Url: https://git.r.bdr.sh/rbdr/r.bdr.sh/commitdiff_plain/40af835cd5c95e4de38fe9b8e1d0b4150f4a32e3?ds=inline Add control --- diff --git a/js/animation.js b/js/animation.js index c71ee0c..f2f998a 100644 --- a/js/animation.js +++ b/js/animation.js @@ -86,8 +86,6 @@ i.c = (i.c + 2) % 101 } - canvas.addEventListener('click', () => (Z ? Z=0:(Z=1;frm()))) - function frm(t) { if (Z) requestAnimationFrame(frm) @@ -106,6 +104,7 @@ } } + canvas.addEventListener('click', () => (Z ? Z=0:(Z=1&&frm()))) frm() } )()