I found and edited this open processing example, right now it is just creating random bubbles but I want text to appear at the center of these bubbles. For example an array n=[‘A’,‘B’,‘C’] and have them appear in the bubbles. How might I go about doing this? Thank you!
class line {
constructor() {
this.nsX = random(100);
this.nsY = random(100);
this.color = color(random(360), 100, 100, 255);
this.sw = random(width/20, width/3);
this.aryPoints = [];
}
update() {
this.nsX += _nsRate;
this.nsY += _nsRate;
this.aryPoints.unshift([
width/3 * cos(8*PI*noise(this.nsX)),
height/3 * sin(8*PI*noise(this.nsY))
]);
while (this.aryPoints.length > _maxPoint-1) {
this.aryPoints.pop();
}
}
draw() {
stroke(this.color);
strokeWeight(this.sw);
push();
translate(width/2, height/2);
beginShape();
for (let i = 0; i < this.aryPoints.length; i++) {
curveVertex(this.aryPoints[i][0], this.aryPoints[i][1]);
}
endShape();
pop();
}
}