xxxxxxxxxx
19
let fruits;
function setup() {
fruits=loadImage("assets/fruits.png")
createCanvas(400, 400);
}
function draw() {
background(220);
image(fruits,0,0,height,width)
let fruit2=fruits.get(mouseX,mouseY,200,200)
push()
tint(300,150,300)
image(fruit2,width/2,width/2)
pop()
}