xxxxxxxxxx
30
let basket;
let space = 5;
let mess = 0;
function preload() {
basket = loadImage("./ball.png");
}
function setup() {
createCanvas(400, 400);
background(42);
noStroke();
basket.resize(200, 200);
translate(width / 4, height / 4);
for (let x = 0; x < basket.width; x += space) {
for (let y = 0; y < basket.height; y += space) {
let [r, g, b] = basket.get(x, y);
fill(r, g, b);
if (r > 0) {
circle(x-mess, y, space * 0.5);
}
}
}
}
function draw() {
// image(basket,200,200);
}