xxxxxxxxxx
let button;
let input;
function setup() {
createCanvas(windowWidth, windowHeight);
button = createButton('Hello');
button.position(20, 60);
button.mousePressed(hello);
input = createInput();
input.position(20, 20);
background(255);
colorMode(HSB, 360, 100, 100, 100);
}
function draw() {
}
function hello(){
print('hello' + input.value());
let name = input.value();
for (let i = 0; i < 100; i++) {
textAlign(CENTER);
textSize(random(10, 80));
push();
fill(random(180, 240), 100, 100, 80);
translate(random(width), random(height));
rotate(random(2 * PI));
text('Hello ' + name + '!!', 0, 0);
pop();
}
input.value('');
}