xxxxxxxxxx
22
//The player's data
let playerData = {
x: 0,
y: 0,
img:
"https://aws1.discourse-cdn.com/standard10/uploads/processingfoundation1" +
"/original/1X/f026ec45c50121b5d28bf43cacf1cded97b4278e.png",
};
let playerImg;
//This should create a canvas and load the image from the data set
function setup() {
createCanvas(720, 400);
playerImg = loadImage(playerData.img);
}
//Draws the loaded image on the canvas
function draw() {
image(playerImg, playerData.x, playerData.y);
}