xxxxxxxxxx
24
let field;
let dog;
function preload() {
field = loadImage("field.jpg");
dog = loadImage("dog.png");
}
function setup() {
createCanvas(500, 500);
}
const fieldWidth = 500;
const fieldHeight = 500;
const dogWidth = 100;
const dogHeight = 100;
function draw() {
image(field, 0, 0, fieldWidth, fieldHeight);
image(dog, 450-dogWidth/2, 300, dogWidth, dogHeight);
image(dog, 250-dogWidth/2, 300, dogWidth, dogHeight);
image(dog, 50-dogWidth/2, 300, dogWidth, dogHeight);
}