xxxxxxxxxx
17
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
if(mouseX < width/2) {
animateWord("left");
} else {
animateWord("right");
}
}
function animateWord(word) {
textSize(32);
text(word,width/2+random(10),height/2);
}