X-Git-Url: https://git.r.bdr.sh/rbdr/r.bdr.sh/blobdiff_plain/08418543475878f3f8c8cdabbeac52478554af04..1d6b1b68eff94d0fb9163d90556787ff1ac508d4:/js/animation.js?ds=inline 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);