let pg, swap;
function setup() {
createCanvas(710, 400);
pg = createGraphics(710, 400, WEBGL);
swap = createGraphics(710, 400, WEBGL);
describe(
'a slowly oscillating, radiating white sphere that fades into a dark gray background through a feedback visual effect'
);
}
function draw() {
pg.reset();
pg.texture(swap);
pg.noStroke();
pg.plane(width, height);
pg.push();
pg.translate(sin(millis() / 200) * 5, cos(millis() / 200) * 5, 0);
pg.fill(255);
pg.sphere(90);
pg.pop();
swap.push();
swap.scale(1.1, 1.1);
swap.texture(pg);
swap.noStroke();
swap.plane(width, height);
swap.pop();
swap.fill(0, 50);
swap.rect(-width / 2, -height / 2, width, height);
image(swap, 0, 0);
}