xxxxxxxxxx
23
const W = 20.0;
const numbers = Array();
function setup() {
createCanvas(1920, 1080);
for (let i = 0; i < (width*height / W / W); i++) {
numbers.push(Math.floor(Math.random()*2))
}
}
function draw() {
background(25);
for (let j = 0; j < height / W; j++) {
for (let i = 0; i < width / W; i++) {
// ellipse(i * W + W / 2, j * W + W / 2, W);
fill(100, 100, 100);
let dist = (mouseX-(i*W))*(mouseX-(i*W)) + (mouseY-(j*W))*(mouseY-(j*W));
textSize(constrain(W-dist*0.0003,0.65*W,W));
text(numbers[W*j+i], i * W + W / 2, j * W + W / 2);
}
}
}