diff --git a/script.js b/script.js index a30f3a3..5e1a8a4 100644 --- a/script.js +++ b/script.js @@ -59,13 +59,13 @@ document.getElementById('dots').setAttribute('d',d); document.getElementById('dots').setAttribute('stroke-dasharray',`0.0000001 ${2*m}`); function easeInOutSine(x) { -return -(Math.cos(Math.PI * x) - 1) / 2; - + return -(Math.cos(Math.PI * x) - 1) / 2; } + function frame() { const period = 1000; const t = (new Date()-0)/period % 1000; - document.getElementById('dots').setAttribute('stroke-dashoffset',easeInOutSine(t)*m); + document.getElementById('dots').setAttribute('stroke-dashoffset',(t)*m); requestAnimationFrame(frame); } frame(); \ No newline at end of file