dwitter.net | FireFly (742)

+ 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: #Opposites
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).

  • Change .11 to another decimal number (e.g. .10 or .13) for a different pattern!
  • u/magna
    What is the nature of the data that you're encoding in that string?
  • u/FireFly
    Just that lil' bitmap in the centre (same way as in other dweets—each bit of each codepoint represents one binary pixel)
  • u/quate
    r=140-16*(t<10?t:0);for(U=0;U<44;(r<8?"䃀䀰䜼䚬䶴伙倃匞䖴䚬䞜䆀䁠".charCodeAt(Y-61)>>X-18&1:0)||x.fillRect(8*X,8*Y,8,8))X=120+r*C(U+=.11)|0,Y=67+r*S(U)|0
  • u/quate
    whoops. sorry.

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

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.

show FPS hide FPS share 2 remixes 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) {

}//
69/140


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

  • Filing this one in the 'half-dweet' category

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

  • Paint! Works best in fullscreen, unfortunately I can't fit detection of mouse button to toggle painting (also not sure how, without two more event handlers…)
  • u/Kalanchoe
    Nice! moveTo is unnecessary if you already have beginPath and lineTo; c.offsetWidth/1920 and c.offsetHeight/1080 are both equal to about .2958 (at least on the desktop): https://www.dwitter.net/d/809
  • u/FireFly
    Won't c.offsetWidth and c.offsetHeight change when the user goes fullscreen? I wanted to support both not-fullscreen and fullscreen equally well. Good point about moveTo!

Please log in (or register) to comment.

show FPS hide FPS share fullscreen
remix of d/2973 by u/FireFly

function u(t) {

}//
125/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
remix of d/1690 by u/FireFly

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

  • Same as parent, but golfed and abusing time for the first 6 frames to evaluate/expand the L-system. The straight line at the start is an artifact of this and the particular choice of system.

Please log in (or register) to comment.

show FPS hide FPS share 1 remix fullscreen
remix of d/24093 by u/TGY

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

  • u/pavel
    font='4cm"'
  • u/FireFly
    ohh good one, didn't know about the font-family name trick
  • u/TGY
    now we need to combine 2 dweets into single XD
  • u/DataMeta
    fit them together with compression, but would be more interesting to jam it into 140 :)
  • u/FireFly
    I can do a full chess board in 151c currently, but it *would* be really satisfying to fit it into the 140c without compression tricks indeed

Please log in (or register) to comment.

show FPS hide FPS share 1 remix fullscreen
remix of d/24124 by u/FireFly

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

  • u/FireFly
    I've stared at this for too long... don't think I can get it below 146 decompressed (with Z inlined). Would be rad if we could squeeze those last characters out though and get it down to 140 without compression :)
  • u/tomxor
    I have an imperfect 142
  • u/Agnes
    This is 145 but I don't remember if the new indexing is actually shorter or not than yours: for(i=w=128;i--;x.fillStyle=R(i%2?x.fillRect(X=i%16*64,Y=i*8&-w,m=X+Y&w,m)|w:x.fillText('♜♞♝♚♛♝♞♜♟ '[Y++%7?++Y%5?9:8:i/2%8],X,Y+w)))x.font="4cm'"

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

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.

Loading...
Next page