xxxxxxxxxx
31
let wordList = [];
for (let i=0; i<20; i++) {
let a = new word("Word1", random(width), random(height), random(10, 50));
word
}
function setup() {
createCanvas(400, 400);
textSize(20)
background(220);
let a = new word("Word1", random(width), random(height), random(10, 50));
let b = new word("Word2", random(width), random(height), random(10, 50));
textSize(a.s)
text(a.name, a.x, a.y)
textSize(b.s)
text(b.name, b.x, b.y)
}
class word {
constructor(name, x, y, s) {
this.name = name;
this.x = x;
this.y = y;
this.s = s;
}
}
function draw() {
}