dwitter.net | tomxor (5353)

+ 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
remix of d/21547 by u/tomxor

function u(t) {

}//
102/140


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

  • u/tomxor
    Each block is 4 pixels wide. Remove 2 of the three parts inside !( ) to see how each contributes to the shape. Make sure to leave an | 0 to the right in order to floor the result. Black represents 0, white represents 1 or more. The idea is to lay down three different layers, the non zero numbers all merge together throught OR, the black area that remains is the 0 from each layer.
  • u/tomxor
    X/34-65/35 | 0 scales X so that -1 and +1 lie on the left and right edges with 0 in between. The width = 34=17*4px/2 (17 blocks and gaps, divided by two because it's from -1 to +1). 65=128/2+1, the center of the canvas+1 due to -0 bias divided by 35 to match the scale of X. Y/8-37/9 | 0 does the same for the top and bottom edges. X+2&4 creates a repeating pattern 0,4,0,4 every 4 pixels, +2 shifts it by half a block to line up with the left and right edges due to the odd number blocks required for the default.
  • u/Qwitter
    thanks for this

Please log in (or register) to comment.

remix of d/21533 by u/New_Core

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
remix of d/21554 by u/tomxor

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

Please log in (or register) to comment.

show FPS hide FPS share 1 remix fullscreen
remix of d/21547 by u/tomxor

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
remix of d/21339 by u/tomxor

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 1 remix fullscreen
remix of d/21363 by u/tomxor

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
remix of d/21327 by u/indjev99

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/21304 by u/tomxor

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

  • Smolr
  • u/tomxor
    Also slower, poorly distributed and generally worse... but it fits :P
  • u/tomxor
    #default
  • u/Qwitter
    ; ) nice
  • u/pavel
    Very nice!
  • u/pavel
    -3 slightly lighter for(n=i=9;i;T+=S(r),R+=C(r))R*R<4e5&&T/425|R/99|T/25+17&2?x.fillRect(960+T,540+R,n/++u**.5,.1):r=(u=--n)?t*i*n:(n=T=8,R=i---640,t/i%2-1)

Please log in (or register) to comment.

show FPS hide FPS share fullscreen
remix of d/21369 by u/tomxor

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.

remix of d/21217 by u/tomxor

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.

Loading...
Next page