u(t) is called 60 times per second.
t: Elapsed time in seconds.
S: Shorthand for Math.sin.
C: Shorthand for Math.cos.
T: Shorthand for Math.tan.
R: Function that generates rgba-strings, usage ex.: R(255, 255, 255, 0.5)
c: A 1920x1080 canvas.
x: A 2D context for that canvas.
almost kinda golfed it c.width|=p=3.14;with(x)fillRect(0,0,2e3,2e3),beginPath(strokeStyle="#90F"),lineWidth=L=200*S(t%p),arc(960,540,400*S(t%p/2)-L/2,0,7,0),stroke()
u/13thptr : i just removed the last argument of arc() lmao
u(t) is called 60 times per second.
t: elapsed time in seconds.
c: A 1920x1080 canvas.
x: A 2D context for that canvas.
S: Math.sin
C: Math.cos
T: Math.tan
R: Generates rgba-strings, ex.: R(255, 255, 255, 0.5)