xxxxxxxxxx
16
let img; // use a variable to store our image
function setup() {
createCanvas(400, 400);
img = loadImage('beautiful-sunflower-material-design-png_100731.png'); // load the image
}
function draw() {
let xpos = mouseX;
let ypos = mouseY;
imageMode(CENTER);
// displays the image at its actual size at point (0,0)
image(img, xpos, ypos, 200, 200);
}