xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(255);
rectMode(CENTER);
}
function draw() {
background(0, 3);
translate(width/2,height/2);
let s= map(sin(millis()/1000), -2.5, 5, -500, 500);
let r2 = map(sin(millis()/1500), -1, 1, 0, PI);
noFill();
stroke(225,149,243);
translate(s, 0);
rotate(r2);
//scale(0.5, 1.5);
//circle(0, 0, 200);
rect(0, 0, 180, 200, 300, 300, 10, 10);
let s2= map(sin(millis()/1000), -5, 5, -500, 500);
let r3 = map(sin(millis()/1500), -1, 1, 0, PI);
noFill();
stroke(130,255,164);
translate(s2, 0);
rotate(r3);
rect(0, 0, 180, 200, 300, 300, 10, 10);
}