dwitter.net | #FF0

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

}//
137/140


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

  • Four colours tartan uncompressed and full-res ! Thx Pavel !
  • u/danny@hille.dk
    nicely done sir 🧐
  • u/pavel
    Beautiful!
  • u/Xen
    love it!
  • u/pavel
    I shaved off 12 more chars for(i=4e3;X=--i>>1;x.fillRect(X,Y,1,X+Y+8*i&8))Y=60*t,x.fillStyle=['#D23','#24A',R(),'#FF0'][0x66ba6545>>((i%2?Y:X)/16&30)&3]

Please log in (or register) to comment.


function u(t) {

}//
131/140


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

  • Nemo me impune lacessit
  • u/solendil
    Look into the code: it's easy to generate your own Tartan : ['red','#000','#FF0']['0000100001112111'[(V>>2)%16]
  • u/Xen
    nicely done!!!

Please log in (or register) to comment.

show FPS hide FPS share 1 remix fullscreen

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

  • u/quuxman
    I was hoping to shrink it to the point of adding little dots, but I don't think it's possible
  • u/quuxman
    I was hoping to shrink it to the point of adding little dots, but I don't think it's possible
  • u/quuxman
    c.width+=0 x.fillRect(0,0,w=2e3,w) x.fillStyle='#ff0' x.moveTo(a=t*500%w,b=540) x.arc(a,b,100,m=S(t*15)*.4+.4,-m) x.fill()
  • u/mohd-akram
    Yeah, that was my initial goal :D
  • u/mohd-akram
    c.width+=0;x.fillRect(0,0,w=2e3,w);y=540;t=t*y%w;for(i=w;i>=0;i-=5e2)if(!i||t<i)x.beginPath(),x.lineWidth=l=i?20:99,x.arc(i||t,y,l/2,m=i?.01:S(t/l*2)**2,-m),x.strokeStyle=R(y,y,i&&y),x.stroke()
  • u/joeytwiddle
    You could post the "too long" version on codegolf.tk if you like :)

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

  • Challenge: add waves :)
  • u/magna
    Add the following at the end: //🌊
  • u/katkip
    XD
  • u/f8f82804
    150: x[s='fillStyle']='cyan';x[r='fillRect'](0,0,w=2e3,w);x[s]='#ff0';x.fill(x.arc(960,540,3e2,0,7));for(i=w;i--;x[s]='blue')x[r](i,540+20*S(4*t+i/50),1,w)

Please log in (or register) to comment.

You've reached the end.