xxxxxxxxxx
let cX = 0;
let vX = 5;
let vA = 1;
let num = 0;
function setup() {
createCanvas(windowWidth, windowHeight);
background(33);
angleMode(DEGREES);
cX = width / 2;
}
function draw() {
background(33);
fill(255,255,55);
cX += vX;
if(cX >= width*0.8 || cX < width*0.2)
vX *= -1;
let cY = height / 2;
num += vA;
if(num < 0 || 30 <= num)
vA *= -1;
let sA = num
let eA = 360-num
if(vX < 0){
sA += 180;
eA += 180;
}
arc(cX,cY, 200, 200, sA, eA);
}