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.
all of the x.method() calls return undefined, and bitwise operators coerce any non-number into 0, so ~x.foo() = ~undefined = ~0 = -1. The purpose of this - all of those method calls are defined as parameters to other methods, not for their return value, but to save 1 char. i.e x.foo(0,0);x.bar()=18 x.foo(0,~x.bar())=17, that the parameter is -1 instead of 0 doesn't matter too much in these cases.
u/tomxor that's awesome. Thanks for explaining that!
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)