let x, y;
let fontSize = 40;
let angle = 0;
let speed = 0.02;
let increment = 0;
let spam = "SPAM";
let xpos = [];
let ypos = [];
function setup() {
createCanvas(800, 800);
x = width / 2;
y = height / 2;
textAlign(CENTER, CENTER);
textSize(fontSize);
for (let i = 0; i < 10; i++) {
xpos[i] = random(width);
ypos[i] = random(height);
}
}
function draw() {
background(0.69);
angle += speed;
let c = cos(angle) * 127 + 128;
let s = sin(angle) * 127 + 128;
fill(c, s,169);
text(spam, x, y);
fontSize += sin(angle) * 5;
textSize(fontSize);
increment += 0.01;
for (let i = 0; i < xpos.length; i++) {
xpos[i] += cos(increment + i * 0.1) * 5;
ypos[i] += sin(increment + i * 0.1) * 5;
text(spam, xpos[i], ypos[i]);
}
if (frameCount % 100 === 0) {
spam += "SPAM";
xpos.push(random(width));
ypos.push(random(height));
}
}