dwitter.net | tomxor (29548)

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

  • Don't Fall ! #game

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

  • Plot of XOR function

Please log in (or register) to comment.

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

function u(t) {

}//
20/140


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

  • Variable initialisation with only +2 chars (hack)

Please log in (or register) to comment.

show FPS hide FPS share 1 remix fullscreen

function u(t) {

}//
19/140


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

  • hmmm
  • u/tomxor
    Haha, regex cannot parse an AST... also: }{a = 1
  • u/tomxor
    I take that back, not sure what's going on, can't see much happening in between textarea and eval in iframe.
  • u/tomxor
    Ahh, i get it: function u(t) {} {a=1} the end part is valid if it's an object literal or ES6 destructuring.
  • u/tomxor
    You could actually use this for intialisation variables instead of checking !t... might be smaller
  • u/tomxor
    i.e }{a=1 rather than !t||(a=1) (saves 4 chars)

Please log in (or register) to comment.

show FPS hide FPS share fullscreen

function u(t) {

}//
125/140


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

  • Chaos Photographer, Pic 1, Remix 1 #spiral

Please log in (or register) to comment.

show FPS hide FPS share fullscreen
remix of d/15387 by u/taupelink

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

  • Deterministic version using 2/3 of an XORSHIFT seeded with 1.

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

  • A colorization of sorts, for d/14116
  • u/tomxor
    Nice, looks more like microcircuitry with colour.

Please log in (or register) to comment.

show FPS hide FPS share 1 remix fullscreen

function u(t) {

}//
126/140


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

  • If you take two random integers of at most 7 digits each, what is the probability that they are relatively prime? This simulation suggests somewhere around 60%

Please log in (or register) to comment.

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

  • GCD of two random numbers

Please log in (or register) to comment.

show FPS hide FPS share fullscreen
remix of d/15355 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