dwitter.net | tomxor (5378)

+ 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 fullscreen
remix of d/24161 by u/FireFly

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

  • Show more comments…
  • u/tomxor
    fillText Y=i==52?Y-T:Y+T, but can't animate with this method. Don't think it's going to be possible in 140 ether.
  • u/DataMeta
    ugh yes. so satisfying
  • u/sigveseb
    very good, but the king and queen on one side are reversed!
  • u/tomxor
    oops good spot

Please log in (or register) to comment.

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

  • Show more comments…
  • u/danny@hille.dk
    I distinctly remember the grid to be blue... but all the youtube videos shows it to be purple... I think it's a conspiracy :-)
  • u/ullo
    i like
  • u/KilledByAPixel
    dweetabase updated! https://dweetabase.3d2k.com/
  • u/tomxor
    I can't find it now but I seem to remember reading about how emulated colours of amigas look different from real amiga video output. The emulators are probably just spitting out the RGB values and letting the host OS do the gamma etc. I suspect real amiga video output must have been a bit "coloured" which causes this difference.

Please log in (or register) to comment.

show FPS hide FPS share 1 remix fullscreen
remix of d/12335 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).

  • u/tomxor
    With subpixel anti-aliasing :) ... ok that was an accident... but atand back and look at those cute RGB fringes!

Please log in (or register) to comment.

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.

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 fullscreen
remix of d/19945 by u/katkip

function u(t) {

}//
121/140


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

  • Smaller toxic #sign

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/tomxor
    C(t*n)? Strange how it doesn't perceptibly speed up.

Please log in (or register) to comment.

show FPS hide FPS share 1 remix fullscreen

function u(t) {

}//
75/140


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

  • u/tomxor
    Perfect collision integration, since uniform gravity is constant it should cancel out in such a simple case, in which case integration can be skipped on a collision interval ?-b:b+.3 this is why it doesn't loose or gain significant hight on average
  • u/tomxor
    To make it absolutely perfect this can also be changed to ?-b:b+.25 which will eliminate integration error since .25 is a non periodic binary fraction... it will bounce forever :)
  • u/tomxor
    ... but that would cost an extra byte so its no good !

Please log in (or register) to comment.

show FPS hide FPS share 1 remix fullscreen
remix of d/15979 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 fullscreen
remix of d/12492 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).

  • Show more comments…
  • u/DataMeta
    Haha, Xen
  • u/tomxor
    Nice analogy :) like a TV into the computable universe, infinite channel! (sorta)
  • u/21medals
    Why the space in between each character of E?
  • u/tomxor
    Because -- and ++ are assignment operators, and I cannot allow those on loops variables X and Y. It's basically cheaper in chars to pad with spaces than test for this with a regex.

Please log in (or register) to comment.

Loading...
Next page