dwitter.net | cantelope (3062)

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

}//
140/140


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

  • u/iverjo
    for(x.fillRect(0,0,i=c.width=960,i),w=i/2;i--;x.strokeStyle='#fff')[15,0,1].map(k=>{g=i-k,x.lineTo(w+S(q=g/(h=152.8)+t/3)*(Z=C(p=g/2.3873)+5)/(Z=C(q)*Z-9)*w,(S(p)-3)/Z*w)});x.stroke();

Please log in (or register) to comment.

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

Please log in (or register) to comment.

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

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

  • Xen golfed the last 5 bytes. Cheers!
  • Show more comments…
  • u/donbright
    no its fine, my words dont come across in ASCII very well
  • u/donbright
    i am in awe of everyone here, my mind constantly boggles at the skill and techniques of all of the people here. i have a special affinity for wireframe for some reason.
  • u/donbright
    i mean i like looking at wire frame, but im not that good at making it, so its cool to see it.
  • u/cantelope
    ah <3

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

  • just made a few small changes.. loved this one and wanted to see it with colors inverted :D

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

  • I'm sure some of you can shorten this considerably.
  • u/alien
    good sir what does F=(v)=> are you doing some functional programming here?
  • u/joeytwiddle
    🏳️‍🌈
  • u/cantelope
    @alien the F=(v)=> is indeed a function, using the short ES6 arrow syntax. Its purpose is to return a hex value between 0 and 255, (with a preceding 0 when value is less than 16). the hex code is then combined with 2 other hex codes to form a complete, valid color code in the form of #000000. There is a shorter way to do this but it results in exponentially fewer colors. sorry for delayed response.
  • u/New_Core
    Using rgb colors instead of hex you dont need to struggel with converting. a=130;for(i=1e3;i--;x.fillStyle=R(a*S(v=i/70-t*4)+a,a*C(v)+a,-a*S(v)+a))x.fillRect(5*i,0,5,2e3) a here uses 130 of the 255 colors to match the same colors.
  • u/alien
    thank you for the response @catelope

Please log in (or register) to comment.

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

  • interpolated shapes

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

  • torus 4
  • Show more comments…
  • u/tomxor
    @cantelope You might be thinking of the subpixel aliasing issue on Firefox that appeared when they flipped hardware rendering on by default. That affected a lot of dweet rendering, I reported it a while back and it's been fixed in release since v128
  • u/cantelope
    whatever causes the firefox+canvas+linux thing, somehow i always correctly guess the stack... whatever that means
  • u/lewdev
    I was on win11 on my laptop, but it was slow on both Chrome & Firefox. It's smooth on my desktop Win11, which is much more powerful.
  • u/cantelope
    well there you have it, bunk lappy

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

}//
138/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