dwitter.net | Ghoust (18993)

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

}//
117/140


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

  • Super lazy thematic emoji dweet

Please log in (or register) to comment.

show FPS hide FPS share fullscreen
UEZ
remix of d/26609 by u/Xen

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

  • Xmas tree with snow

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

function u(t) {

}//
99/140


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

  • golf & play

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

function u(t) {

}//
135/140


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

  • Merry Xmas Dwitter Famalang!
  • u/BriSeven
    wonderful remix, i am amazed that people are still tweaking this one
  • u/danny@hille.dk
    treeception -> t?0:x.fillRect(0,0,2e3,2e3) for(Y=(a=i=555)*t%(X=1e3);--i;)x.fillText(i%9?'🌲':'⭐',X+=S(a+=4*Math.random())*Y/59,Y+=C(a)*9)

Please log in (or register) to comment.

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

  • This years tree is in the snow. =)

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

  • u/magna
    Amazing!
  • u/jorduino
    The code you have provided is a JavaScript program that uses the u() function to draw an animation on an HTML canvas element. The u() function is called 60 times per second, and uses the elapsed time t as a parameter to create the animation. The code uses a number of shorthand functions and variables to simplify the implementation of the u() function. The S, C, and T variables are shorthand for the Math.sin(), Math.cos(), and Math.tan() functions, respectively. The R() function is used to generate rgba color strings, and the c and x variables represent the canvas element and its 2D context, respectively. The u() function uses a loop to iterate over a range of values for i, and uses these values to calculate the X, Y, and Z coordinates for each iteration. The X and Y coordinates are used to draw a rectangle on the canvas using the fillRect() method, and the Z coordinate is used to scale the rectangle and create the illusion of depth. The globalAlpha property is used to set the transparency of the rectangles, and the style.filter property is used to invert the colors of the canvas. Overall, this code appears to be a simple example of how the canvas element and the u() function can be used to create an animation in JavaScript. It uses some advanced features of the language, such as shorthand functions and the canvas element, to create a visually interesting effect.
  • u/joeytwiddle
    This gives a better distribution of particles: Y=((i-.1)**5+t*2)%13-9 no more grid, but a few clusters

Please log in (or register) to comment.

show FPS hide FPS share 1 remix fullscreen

function u(t) {

}//
128/140


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

  • Snowflake Generator ❄️

Please log in (or register) to comment.

show FPS hide FPS share fullscreen
remix of d/26600 by u/hoplite

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/26599 by u/hoplite

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