From: Ruben Beltran del Rio Date: Tue, 13 Feb 2024 22:16:29 +0000 (+0100) Subject: Change order X-Git-Url: https://git.r.bdr.sh/rbdr/r.bdr.sh/commitdiff_plain/ce04a48feb0df3786be635c7df161342d0d2e119 Change order --- diff --git a/js/animation.js b/js/animation.js index e5e73c2..d5bc6b8 100644 --- a/js/animation.js +++ b/js/animation.js @@ -1,15 +1,15 @@ (function () { var canvas = document.querySelector('canvas'), + r = Math.random, + pi = Math.PI, + cos = Math.cos, + sin = Math.sin, context = canvas.getContext('2d'), fps = 30, lastFrame = 0, speed = 1, - size = 5 + rand(10), - r = Math.random, - pi = Math.PI, - cos = Math.cos, - sin = Math.sin; + size = 5 + rand(10); var clear = !!(r() > 0.5); var changeColor = !!(r() > 0.5);