dwitter.net | pavel (2671)

+ 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.
show FPS hide FPS share 1 remix 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).

  • pavel: Rubik's Cube Movement
  • Load older comments...
  • pavel: Here are notation-only moves for(c.width|=f=g=>(k%16&&1+k%2*.414)*g(a=.7854*(k+y*2/(1+1e3**(t%1*4-i)))),k=57;i=--k>>4;x.fillRect(960+700*X/z-s,540+700*Y/z-s,s*=2,s))[X,Y,Z]=[y=i-2,X=f(C),f(S),y,X].slice(t%3),z=3+Z,s=99/z/z
  • username: Technically you are moving both sides at the same time in that case instead of moving the middle layer.
  • katkip: ^

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

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

Please log in (or register) to comment.

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

function u(t) {

}//
130/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/14376 by u/pavel

function u(t) {

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

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

Please log in (or register) to comment.

show FPS hide FPS share fullscreen
remix of d/14376 by u/pavel

function u(t) {

}//
134/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/10076 by u/yonatan

function u(t) {

}//
143/140


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

  • pavel: The velocity of the bounce changes on every hit, otherwise the ball would settle on a simple pattern

Please log in (or register) to comment.

show FPS hide FPS share fullscreen
remix of d/11101 by u/pavel

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.

Loading...
Next page