xxxxxxxxxx
104
x = 0;
d = 0.5;
var c = 0;
function setup() {
createCanvas(400, 400);
background(220);
frameRate(144);
}
function draw() {
x+=d;
y = 150 + (sin(2*x/100) * 200) + (x-200);
cases();
if (x>400){
x=0;
c+=1;
if (c > 3){
c= 0;
}
background(220);
}
}
function cases(){
pewdiehillslols();
otherthing();
}
function otherthing(){
//thats what they look like right? =-+---
switch(c) {
case 0:
noFill();
stroke(sin(x)*255, y/10, 51)
bezier(0,0,200,400,x,y,0,0);
fill(100);
point(x,y);
break;
case 1:
noFill();
stroke(sin(x)*255, y/10, 51)
bezier(y,400,200,y,y,x,400,400);
fill(100);
point(x,y);
break;
case 2:
noFill();
stroke(sin(x)*255, y/10, 51)
bezier(y,400,x,400,x,y,400,-400);
fill(100);
point(x,y);
break;
default:
noFill();
stroke(sin(x)*255, y/10, 51)
bezier(x,400,200,400,x,y,400,400);
fill(100);
point(x,y);
}
}
function pewdiehillslols(){
//thats what they look like right? =-+---
switch(c) {
case 0:
noFill();
stroke(sin(x)*255, y/10, 51)
bezier(0,400,200,400,x,y,400,400);
fill(100);
point(x,y);
break;
case 1:
noFill();
stroke(sin(x)*255, y/10, 51)
bezier(y,400,200,400,x,y,400,400);
fill(100);
point(x,y);
break;
case 2:
noFill();
stroke(sin(x)*255, y/10, 51)
bezier(y,400,200,400,x,y,400,400);
fill(100);
point(x,y);
break;
default:
noFill();
stroke(sin(x)*255, y/10, 51)
bezier(x,400,200,400,x,y,400,400);
fill(100);
point(x,y);
}
}