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