dwitter.net

+ 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) {

}//
117/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/AnielaMW
    x.fillStyle=R((t*600-i/9)%999,255,(t*600-i/9)%999),
  • u/AnielaMW
    i=1920;j=Math.abs;for(;i--;)a=(t*600-i/9)%999,x.fillStyle=R(a,255,a), x.fillRect(i,500+100*j(T(i/599))*S(j(i/90)),1,40)
  • u/AnielaMW
    still trying to get the black background
  • u/joeytwiddle
    This is wrong but perhaps you can fix it: i=1920;j=Math.abs;for(;i--;)a=(t*600-i/9|0)%999,x.fillStyle=R(0,a,0),x.fillRect(i,a?500+100*j(T(i/599))*S(j(i/90)):0,1,a?40:999)

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

function u(t) {

}//
93/140


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

show FPS hide FPS share fullscreen
Xen

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).

Please log in (or register) to comment.

show FPS hide FPS share 1 remix 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).

  • ASCII Art Renderer

Please log in (or register) to comment.

show FPS hide FPS share 1 remix fullscreen
remix of d/6715 by u/AnnanFay

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).

  • Slideshow v2: A new Dweet every 9 seconds. Current Dweet in error message. Version 2 comes with improved compatibility, usability and performance.
  • u/fujimotos
    Oh, why do you use kanji characters as variables?
  • u/AnnanFay
    The kanji are so I don't accidentally redefine a variable which something uses. For example there's code which does t||(_=c.width) so if I use _ it would break the code. It will break stuff which uses these kanji, but right now this is the only dweet using them.
  • u/fujimotos
    Nice. I didn't know that they are valid variable names...
  • u/DataMeta
    #hiddengem
  • u/joeytwiddle
    Unfortunately this magic got blocked when CSF was introduced

Please log in (or register) to comment.

show FPS hide FPS share 1 remix 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).

  • Langton's ant

Please log in (or register) to comment.

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).

Please log in (or register) to comment.

show FPS hide FPS share 1 remix fullscreen

function u(t) {

}//
96/140


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

  • Etch a Sketch, AS - left knob CCW and CW, KL - right knob CCW and CW, G - shake
  • Show more commentsโ€ฆ
  • u/snydej
    zanella: I'll give you the golf, but it's not a fix. It'll break if you press x or c. Not that I care too much; this dweet is quite clever even if no one should ever do this in practice.
  • u/snydej
    Btw thanks for the explanation :) Also I golfed 9 more characters off it: t?g?c.width|=g=0:onkeydown=e=>self[e.key]+=10:a=s=k=l=g=0;x.fillRect(s-a,l-k,10,10)
  • u/zanella
    u/snydej You're right, it's not a fix if it breaks something else. :D And I agree, this dweet is totally ingenious!
  • u/zanella
    The unavoidable remix: https://www.dwitter.net/d/7102

Please log in (or register) to comment.

show FPS hide FPS share 1 remix fullscreen
remix of d/6609 by u/anilalur

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).

Please log in (or register) to comment.

show FPS hide FPS share fullscreen
Xen

function u(t) {

}//
136/140


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

Please log in (or register) to comment.

Loading...
Next page