xxxxxxxxxx
26
let img;
//function preload(){
//img = loadImage("terre.jpeg");
//}
function setup() {
createCanvas(400, 400);
img = loadImage("terre.jpeg");
}
function draw() {
background(220);
//img.resize(width, 0);
imageMode(CENTER);
push();
translate(200, 200);
image(img, 0,0, width/2, height/2);
pop();
let c = img.get(mouseX, mouseY);
fill(c);
square(mouseX, mouseY, 50);
}