xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(0);
rectMode(CENTER)
}
function draw() {
background (0);
translate(width/2, height/2);
let s = map(sin(millis())/100, -1, 1, -200, 200);
noFill();
stroke(255);
translate(s, 0);
rect(0, 0, 200, 200)
}