xxxxxxxxxx
28
let catpic; // STEP 1
let cat2;
let hershey;
function preload() {
catpic = loadImage("cat.JPG"); // STEP 2
cat2 = loadImage("shiva.jpg");
hershey = loadFont("hershey_cursive.otf");
}
function setup() {
createCanvas(400, 400);
}
function draw() {
background(240, 240, 255);
// image(image, x, y, w, h);
//image(catpic, 0, 0, width, height); // STEP 3
image(cat2, 140, 40, 100, 150);
image(cat2, 20, 200, 100, 150);
image(catpic, 140, 200, 100, 150);
textSize(40); // set the size of your text
textFont(hershey); // set the font
fill(0, 100, 0); // set the color
text("Jean!", 20, 80);
}