Dwitter Login or register + New dweet hot new top random show FPS hide FPS function u(t){ c.width=1920; /* clear the canvas */ for(i=0;i<9;i++) x.fillRect(400+i*100+S(t)*300, 400, 50, 200) /* draw 50x200 rects */ } // 122/140 Please log in (or register ) to post a dweet (copy-paste the code somewhere safe to save it meanwhile) 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. 170 Awesome! show FPS hide FPS fullscreen share sigveseb remix of #302 by sigveseb function u(t){ (F=Z=>{for(x.fillStyle=R(W=1/Z*4e3,W/2,W/4),i=Z*Z*2;n=i%Z,m=i/Z|0,i--;n%2^m%2&&x.fillRect...