dwitter.net | mohd-akram (6754)

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

}//
132/140


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

  • u/katkip
    Cool
  • u/magna
    #truchet
  • u/pavel
    with(x)for(i=c.width|=h=1.5708;j=i-->>5;stroke())setTransform(9,0,0,9,(i&30)*81,--j*162),beginPath(rotate(h/(1+1e9**S(t+(i>>1)*(j+1))))),arc(p=i%2*18-9,p,9,a=2*h*i,a+h)

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

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

  • u/katkip
    Beautiful
  • u/katkip
    Beautiful
  • u/pavel
    with(x)for(c.width|=i=384;j=i-->>5;stroke())for(setTransform(9,0,0,9,((i&28)-j%2*2)*80,--j*160),rotate(i*355/226),beginPath(k=3);k--;)lineTo(3-3*k,9+(2-k%2)*(3-6/(1+3e2**S(3*t))))

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

  • Diamond

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

function u(t) {

}//
66/140


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

  • now with audio

Please log in (or register) to comment.

remix of d/11455 by u/pavel

function u(t) {

}//
121/140


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

  • Black Hole
  • u/pavel
    Deleting %(2*Math.PI) works in Chrome but not in Safari.
  • u/pavel
    Notice that the radius does not change with time. The inward motion is achieved by drawing a smaller radius square next to where the larger radius square was a frame ago.
  • u/pavel
    If the squares were numbered you'd see that the numbers jump around every frame.
  • u/pavel
    I've made an explanation dweet d/11488

Please log in (or register) to comment.

show FPS hide FPS share fullscreen
remix of d/11472 by u/cantelope

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

  • k=[4 bits for y][4 bits for x][3 bits for hexagon vertex]
  • Show more comments…
  • u/pavel
    d is horizontal offset, even rows are offset from odd rows. Using +4*t&1 to explicitly cycle the animation every second instead of implicitly cycling every 2 seconds. Longer cycle leads to z<0 and glitches or hexagons that don't reach the camera.
  • u/magna
    Wow!
  • u/aleamb
    awesome!!!
  • u/pavel
    #uncompressed with one plane

Please log in (or register) to comment.


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
akm
remix of d/11450 by u/katkip

function u(t) {

}//
109/140


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

  • is it rolling towards or away from you?

Please log in (or register) to comment.

show FPS hide FPS share fullscreen
remix of d/11437 by u/katkip

function u(t) {

}//
118/140


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

  • u/Qwitter
    seems backwards to me, but its awesome.

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

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

  • Just my first dweet playing with the sin function

Please log in (or register) to comment.

Loading...
Next page