xxxxxxxxxx
35
let word = 'cereal';
let index = 0;
function setup() {
createCanvas(400, 400);
frameRate(0.5);
//noLoop();
}
function draw() {
background(220);
fill(40, 70, 80);
ellipse(windowWidth/2, windowHeight/2, 50, 50);
textSize(40);
index++;
if(index >= word.length) {
index = 0
}
// for(let i = 0; i< word.length; i++){
//text(word[i], random(windowWidth/2), random(windowHeight/2));
}
function mousePressed() {
for(let i = 0; i< word.length; i++){
text(word[i], random(width/2),random(height/2));
}
}
//function mouseReleased(){
//redraw();
//}