xxxxxxxxxx
50
let e_pos;
let l_pos;
let a = 100;
function setup() {
createCanvas(600, 500);
background(30);
angleMode(DEGREES);
// colorMode(HSB);
e_pos = createVector(width/2, height/2);
l_pos = createVector(0, 0);
}
function draw() {
// rects();
ellipses();
}
function ellipses(){
translate(width/2 - 50, height/2 - 50);
// blue ellipses
push();
rotate(frameCount);
stroke(25, 247, 255, a);
noFill();
ellipse(e_pos.x, e_pos.y, 50, 70);
pop();
e_pos.add(random(-2, 2));
// orange ellipses
push();
rotate(-frameCount);
stroke(252, 162, 40, a);
noFill();
ellipse(e_pos.x, e_pos.y, 50, 70);
pop();
e_pos.add(random(-2, 2));
}
function rects(){
push();
stroke(255, 255, 255, a);
noFill();
translate(width/2, height/2);
rect(l_pos.x, l_pos.y, 40, 90);
pop();
}