dwitter.net | lionleaf (43038)

+ 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

function u(t) {

}//
108/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) {

}//
140/140


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

  • I had implemented so many more features, like a nice gradient while drawing, but had to scrap a lot to get it in 140 characters... :( DwitLonger please!
  • Show more comments…
  • u/Citiral
    Ooh, that's a really neat trick, thanks! And here I was, so proud of my for loop :p
  • u/Xen
    why that needed to post twice i have no idea :-(
  • u/Xen
    for(i=3;i--;x.t(0,97*i))x.rotate(t*S(i)*2)
  • u/Xen
    there will be a messaging system shortly, will come in handy for shaving that last pesky byte

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 fullscreen

function u(t) {

}//
128/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

function u(t) {

}//
137/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
remix of d/1231 by u/iverjo

function u(t) {

}//
139/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/Xen
    you can live edit the code of any dweet and a 'remix' button appears, click that and it posts with a link to the original ;-)
  • u/lionleaf
    No worries, I've got you sorted ;-) Just make sure to use the remix feature next time. Nice remix, didn't immediately recognize it as such.
  • u/J2D28U
    Damn... I'm new as well and this exchange has kept me here!
  • u/Xen
    all welcome. :-)

Please log in (or register) to comment.

show FPS hide FPS share fullscreen
Xen

function u(t) {

}//
115/140


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

  • u/lionleaf
    Welcome to all the new people from /r/programmer, hackernews and twitter! :D
  • u/Xen
    fresh blood lol! welcome to the jungle, take a look around ;-)
  • u/sigveseb
    oh god the colors:P and welcome to all
  • u/j0bit
    o.O what the heck is going on in this syntax?
  • u/iverjo
    @j0bit: Search for "JS Template Literals" and "JS Ternary Operator" on the internet
  • u/j0bit
    Cool, appreciate it.

Please log in (or register) to comment.

show FPS hide FPS share fullscreen
remix of d/2841 by u/alien

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

}//
129/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.


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.

Loading...
Next page