xxxxxxxxxx
function setup() {
createCanvas(1280, 720);
bg="black";
moji=[]
moji[0] = char(unhex('a500')+int(random(299)));
moji[1] = char(unhex('a500')+int(random(299)));
ts=100;
textSize(ts*0.8);
frameRate(1);
}
function draw() {
background(bg);
if (int(frameCount%4) === 0){
moji[0] = char(unhex('a500')+int(random(299)));
moji[1] = char(unhex('a500')+int(random(299)));
}
for (i = 0; i < width/ts; i++) {
for (j = 0; j < height/ts; j++) {
fill(random(255), random(255), random(255));
text(moji[int(random(2))], i*ts, j*ts+ts);
}
}
}
document.onclick=function(){bg="black"}
document.ondblclick=function(){bg="white"}