Dwitter | FireFly (522)

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

function u(t) {

}//
92/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).

  • FireFly: Spritegen! Generates 48 random sprites each time the dweet is run (make a change to rerun the dweet)

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.

remix of d/3005 by u/FireFly

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

  • FireFly: Ripples! With proper quads instead. Add +Z*X-Z*16 after X*60 for perspective projection too (brings it up to 146)
  • Load older comments...
  • FireFly: Another byte can be saved with with(x), but this causes a fair bit of slowdown for me. Thanks for some golfing tips from qfox and others on the jsgolf slack :)
  • cantelope: can't stop watching. def in my top 10 favs
  • iverjo: Very impressive!

Please log in (or register) to comment.


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

Please log in (or register) to comment.

remix of d/2973 by u/FireFly

function u(t) {

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

}//
124/140


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

  • FireFly: I realised with this one that the beginPath is actually redundant since we're resetting the canvas state each frame anyway… whoops

Please log in (or register) to comment.

remix of d/1105 by u/fson

function u(t) {

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

}//
139/140


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

  • FireFly: Spinning 3D model. This one is pretty CPU-heavy, gotta compromise for size
  • Load older comments...
  • sigveseb: is it spinning clockwise or counter-clockwise? :)
  • FireFly: shhh… it's rotating CCW I think, but cheating with the Z-axis/depth ordering means the faces are kind of haphazardly drawn :P
  • Xen: its transdimensional, you meant to do it! ;-)

Please log in (or register) to comment.

remix of d/2923 by u/Xen

function u(t) {

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