dwitter.net | #Snow

+ 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 1 remix fullscreen

function u(t) {

}//
123/140


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

  • Let it snow, let it snow, let it 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).

  • Magical Winter Forest

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

  • Seasons Dweetings 🌲❄️

Please log in (or register) to comment.

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

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

  • Show more comments…
  • u/Xen
    love it!
  • u/magna
    Fun to watch! :)
  • u/tomxor
    @rodrigo I think I have The Dwitter Effect, or "Dwitter Syndrome" :D i'm not even joking
  • u/sigveseb
    Nice idea! As an added bonus, if you leave it running for a while you get a graph of the prng bias for free :)

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

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

  • Snow storm

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

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

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

  • Snow storm #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
remix of d/19550 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.

Loading...
Next page