xxxxxxxxxx
39
let word = "spooning cereal is for chumps";
let wordIndex = 0;
ellipseWidth = 300;
ellipseHeight = 300;
function setup() {
createCanvas(400, 400);
noLoop();
y = height * 0.5;
}
function draw() {
//y = y - 4;
// if (y > 0) {
// y = height;
//}
ellipseMode(CENTER);
ellipse(width/2, height/2, ellipseWidth, ellipseHeight);
if (mouseIsPressed) {
//wordIndex++;
//if(wordIndex >= word.length) {
//wordIndex = 0
//}
for (let i = 0; i < word.length; i++){
text(word[i], random(ellipseWidth), random(ellipseHeight));
}
}
}
function mousePressed() {
//only happens when you click the mouse completely
//let r = random(255);
background(255);
redraw();
}