4 ms·
These all assume certain variables are pre-defined but nowhere does it say what they are. Edit: If you hit "New dweet" it tells you. u(t) is called 60 times p
by twiceaday 8y ago
These all assume certain variables are pre-defined but nowhere does it say what they are.
Edit: If you hit "New dweet" it tells you.
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.
- tokyodude 8y agoI've always wished they'd have totally embraced their shortcuts and added as many as possible. they could shorten every setter and function so c.width could just be w() or c.w= and c.fillStyle could just be fs(style) or c.fs= They arbitrary shorten somethings but not others seems well... arbitrary
- gregschlom 8y agoYou know, the 140 chars limit or even the fact that there should be a limit at all is arbitrary too :)
- exikyut 8y agoHmm, a Short JS or Golfed JS standard should be ratified. Like jQuery. "But that's cheating!", people will say. I disagree; JS is verbose, but it's so widespread that if we can shorten it will result in new levels of compact creativity that we are missing out on. And JS is so full of frameworks, something like this wouldn't set that much precedent.