xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(255);
rectMode(CENTER);
}
function draw() {
//background(0);
// jump to the center of the sketch
translate(width/2, height/2);
// mapping of sin over time (-1 ... +1) to -200 ... 200
// speed is defined by /1000
//let s = map(sin(millis()/1500), -1, 1, -300, 300);
let sc = map(cos(millis()/1000), -1, 1, -600, 600);
//noFill();
stroke(0);
fill(230, 280, 0)
translate(sc, 0)
rotate(millis()/1000);
//ellipse(0, 0, 600, 600);
rect(10, 20, 30, 300)
//triangle(300, 100, 40, 150)
}