I just want to ask a simple question, how do I load an image and make it as a background in my html5 canvas
var bg;
function setup() {
createCanvas(600,400)
bg = loadImage("https://mcdn.wallpapersafari.com/medium/1/92/T1iecJ.jpg")
}
function draw() {
background(bg)
}
i tried that method but the screen only showing whitescreen, i've search for it but i can't get the solution.