xxxxxxxxxx
let circlePos;
function setup() {
createCanvas(windowWidth, windowHeight);
circlePos = createVector(0, 0);
background(0);
}
function draw() {
background(0, 20);
translate(width / 2.0, height / 2.0);
noStroke();
fill(31, 127, 255);
circlePos.x += width / 360.0;
circlePos.y = sin(radians(frameCount)) * height / 2.0
if (circlePos.x > width / 2.0) {
circlePos.x -= width;
}
circle(circlePos.x, circlePos.y, width / 100.0);
}