dwitter.net | #fe2

+ 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: #ScaryMovies

function u(t) {

}//
122/140


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

  • Show more comments…
  • u/tomxor
    Ooh wait it's only 40 chars, log2(3**40) = 63, that could technically fit in a double if you also utilized the exponent.
  • u/rileyjshaw
    hahah I'm loving the ✊🏽s, u/smtsjhr
  • u/rileyjshaw
    u/tomxor yessss good idea! It's a huge number so I couldn't get it aligning w/ exponent across browsers. But it works great with BigInt! Down to 144 characters, scratching my head at the last 4…
  • u/rileyjshaw
    for(w=c.width=92,i=w*w;i--;x.fillStyle=['#000','#fe2','#825'][0|2641546676544449647n.toString(3)[0|i/w%46]])x.fillRect((0|i/w+i%w*13)%w,i%w,1,1)

Please log in (or register) to comment.

You've reached the end.