dwitter.net | AnnanFay (4009)

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

  • u/Yogeshp3
    It's one of those things that you can't tell whether it's rotating clockwise or anticlockwise

Please log in (or register) to comment.

show FPS hide FPS share 2 remixes fullscreen
remix of d/6850 by u/yeet

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
jbl
remix of d/5446 by u/jbl

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

  • 🐛
  • u/fons
    I can stay and watch it forever

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

function u(t) {

}//
94/140


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

  • I think this is a bug with Dwitter and the code should work.

Please log in (or register) to comment.

show FPS hide FPS share fullscreen
remix of d/6823 by u/PietPtr

function u(t) {

}//
126/140


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

  • Just messing around and thought it looked cool.

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

function u(t) {

}//
133/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/6806 by u/DirtyDan

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

  • First time using setTransform, seems useful. .524/(a>3?5:1) is shortform for Math.PI * 2 / (a>3?60:24).
  • u/AnnanFay
    Hmm, just noticed a few things. Would be smaller without with(x) since there's only two method calls. Also we don't need the 0| after the slice because the division will cast for us. So that's 7 characters.
  • u/akm
    You can also remove some parentheses and the l variable: for(c.width|=a=12;a-=3;x.fillRect(-9,6,18,-a*50))x.setTransform(r=C(θ=Date().slice(13+a,15+a)*.524/(a>3?5:1)),n=S(θ),-n,r,960,540)
  • u/silver_bear
    Impressive that you managed to fit both seconds and real hands. Seems I lack a bit of syntax creativity. Nicely done! :)
  • u/iverjo
    #clock

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'm not entirely sure this works, altough I spent quite some time on it. Had a hard time adjusting the angles for the different bases. (24 & 60)
  • u/AnnanFay
    Heh, nice! I notice I have a habit of remixing your work d/6801 It's not on purpose!

Please log in (or register) to comment.

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

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

  • Incorporated improvements from 21medals and myself. Spent extra characters fixing the chomp rate so pac-man eats every square.
  • u/AnnanFay
    c.width|=τ=6.3,y=S(t%1*τ*2) puts this down to 134 bytes. Thanks to joeytwiddle.
  • u/DeathBoy
    Love it :)

Please log in (or register) to comment.

Loading...
Next page