xxxxxxxxxx
55
let fries;
let gridSize = 50;
let t = 'fries <3';
function preload() {
fries = loadImage("fries <3.png");
}
function setup() {
createCanvas(windowWidth, windowHeight);
rectMode(CENTER);
}
function draw() {
background(0);
noStroke();
// fries.resize(500, 500);
// image(fries,0, 0);
for (let i = 0; i < gridSize; i++) {
for (let j = 0; j < gridSize; j++) {
let thisColor = fries.get(
i * fries.width/gridSize,
j * fries.height/gridSize
);
fill(255);
push();
noStroke();
translate(i * width/gridSize,
j * width/gridSize);
//rotate(frameCount*0.1 + map(thisColor[0], 0, 255, 0, PI))
textSize(20);
fill(thisColor);
text(t, width/gridSize ,height/gridSize);
// fill(thisColor);
// rect(0,
// 0,
// height/gridSize );
pop();
}
// fill(0);
// fries(mouseX, mouseY, 100, 100);
}
}