dwitter.net | yokiebob (33)

+ New dweet
function u(t) {
} //
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.
Try the new frontend: beta.dwitter.net
Current theme challenge: #Food
show FPS hide FPS share fullscreen

function u(t) {

}//
140/140


Please log in (or register) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).

  • Melting
  • u/magna
    That's a very compact way!
  • u/joeytwiddle
    Interesting. I wonder how that compares to the unicode technique. This seems to have a shorter decoder.

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

function u(t) {

}//
135/140


Please log in (or register) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).

  • Sun and dunes

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

function u(t) {

}//
138/140


Please log in (or register) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).

  • u/cantelope
    would be better with a brief countdown / intro... hard to race if you're not ready! fun

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

function u(t) {

}//
134/140


Please log in (or register) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).

  • In comments pls
  • Show more comments…
  • u/yokiebob
    with(x)for(O=200,i=0,c.width|=0,f=t=>S(t)+C(t),y=t=>f(t)*C(t)+t,d=t=>(y(t+.1)-y(t))/(f(t+.1)-f(t));i++<14;)m=(3*t-i/2)%7,translate(f(m)*O+600,y(m)*O-O),rotate(Math.atan(d(m))),fillRect(-25,-99,50,O),resetTransform();
  • u/dee-gomma
    Simple initial golfing to reach the goal:
  • u/dee-gomma
    with(x)for(c.width|=i=O=200,f=t=>S(t)+C(t),y=t=>f(t)*C(t)+t;i--;fillRect(-25,-99,50,O),resetTransform())translate(f(m=(3*t-i/2)%7)*O+600,y(m)*O-O),rotate(Math.atan((y(a=m+.1)-y(m))/(f(a)-f(m))))
  • u/yokiebob
    Thanks! Nice work.

Please log in (or register) to comment.

You've reached the end.