Dwitter

Login or register Dwitter hot new top Edit the code to start the fun, or browse through other peoples demos below Code available at github.com/lionleaf/dwitter Issues are welcomed! :D 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. 63 Awesome! fullscreen share lionleaf remix of #302 by sigveseb function u(t){ (F=Z=>{for(x.fil...

Linked on 2017-02-22 23:09:57 | Similar Links