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.
function u(t) {
c.width=500
function v(a,g){if(g>1){x.beginPath();n=g*C(t)
x.moveTo(a+n,g);x.lineTo(a,g*2);x.lineTo(a-n,g);x.stroke()
v(a-n,g/2)}}v(250,125)
Dec 29 2017 8:21 PM UTC
}// 143/140
Please log in (or register ) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).
function u(t) {
k=460
for(i=255;i--;)
{x.fillStyle=R(255-i-(t%9-4)*50,255-i,255-i+(t%5-2)*50,0.02)
x.fillRect(k*2+2*k*C(t*2+i/9),k+k*S(t*2-i/8),99,99)}
Dec 29 2017 6:58 PM UTC
}// 138/140
Please log in (or register ) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).
function u(t) {
c.width|=0
for(i=0;i<1000;i++){
q=i/100-5
w=i%100/10-5
e=i%10-5
p=S(t)*e+C(t)*w
v=C(t)*e-S(t)*w-20
x.fillRect(999+q/v*999,500+p/v*999,9,9)}
Dec 28 2017 9:57 PM UTC
}// 146/140
Please log in (or register ) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).
function u(t) {
c.width|=0
for(i=0;i<1<<16;i+=40){b=i>>6
a=i-((i>>11)<<11)
x.fillStyle=R((C((a+t/9)*C(t))+1)*128,0,C((b-t)*S(t))*2e3)
x.fillRect(a,b,41,41)}
Dec 28 2017 8:55 PM UTC
}// 144/140
Please log in (or register ) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).
function u(t) {
a=(1+C(t))*1e3
b=(1+S(t))*2e3
c=(1+C(t/2))*1e3
d=C(t/2.1)*3e3
x.fillStyle=R(a,d,b)
for(i=0;i<1;i+=1e-3)
x.fillRect(b*i+d-d*i,a*i+c-c*i,5,5)
Dec 28 2017 4:29 PM UTC
}// 145/140
Please log in (or register ) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).
function u(t) {
for(i=255;i>=0;i--){
x.fillStyle=R(i,i,255)
x.fillRect(900+800*S(t-i/255)-i/128, 500+200*C(5.14*(t-i/255))-i/128, 50+i/64, 50+i/64)
}
Dec 28 2017 2:54 PM UTC
}// 136/140
Please log in (or register ) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).
Congratulations! You've reached the end.