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.
e.g. with(Math)with(x)for(font="2cm'",i=9;fillStyle=`hsl(${i*40},99%,40%)`,i--;fillText(f.name,i*220,1e3))fillRect(t*99%2e3,700-(f=[log,S,C,T,floor,ceil,round,sqrt,exp][i])(t)*99,9,9)
Thanks u/cantelope I didn't know about that one. u/magna your remix is awesome. I didn't know about all of those single-argument functions in Math. There's so much more JavaScript to learn!
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)