xxxxxxxxxx
18
// p5.js use an image demo
// https://editor.p5js.org/whatmakeart/sketches/WlIN-W1S5
// set a variable to hold the image
let myImage;
// preload the image file
function preload() {
myImage = loadImage('snowflake.png');
}
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw() {
background(220);
image(myImage, 25, 25, 150, 150);
}