xxxxxxxxxx
30
//click the sketch and type a letter to paint while mouse is down
let cur = "Booty";
function setup() {
createCanvas(400, 400);
background(220);
}
function draw() {
}
function mouseDragged(){
fill(random(255));
textSize(120);
textAlign(CENTER, CENTER);
text(cur, mouseX, mouseY);
}
function keyTyped(){
if(key == ' '){
background(220);
} else {
cur = key;
}
}