xxxxxxxxxx
39
let a = 1
function setup() {
createCanvas(400, 400);
angleMode(DEGREES);
background(15);
}
function draw() {
funkyShape(width / 2, height / 2);
// funkyShape(width/4,height/4,120,120);
a = a + 4;
}
function funkyShape(x, y) {
push();
translate(x, y);
rotate(a);
beginShape();
vertex(0, 0);
vertex(100, 0);
vertex(195, 0);
vertex(130, 20);
endShape(CLOSE);
pop();
if(a>=360){
fill(0, 0, 200);
}
if(a>=720 && a<=1080){
fill(200,0,100)
}
if(a>=1080 && 1440){
fill(200,0,200);
}
}