X-Git-Url: https://git.r.bdr.sh/rbdr/r.bdr.sh/blobdiff_plain/08418543475878f3f8c8cdabbeac52478554af04..a97ec0ab061ba29cdc27df054e259e0ed81d11cc:/js/animation.js 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);