xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(0);
rectMode(CENTER);
}
function draw() {
background (0, 5);
translate(width/2, height/2);
let s= map(sin(millis()/1000), -1, 1, -300, 300);
let r= map(sin(millis()/1500), -1, 1, 0, PI);
translate(s, 0);
noFill();
stroke(255);
push();
//translate(300, 0);
rotate(r);
rect(0, 0, 200, 200);
pop();
push();
let r2= map(cos(millis()/15000), -2, 2, -300, 300);
rotate(r2);
//rect(0, 5, 300, 300, 30, 20, 10);
scale(0.5, 1.5);
circle(0, 0, 75);
}