Hello I am having issues with making js draw images on a html canvas. This is one thing I have tried (along with others) but it doesn’t work. Please can anyone help me with this.
window.onload = function() {
for (i = 0; i < dish1count; i++) {
xpos = Math.random(300);
ypos = Math.random(300);
document.querySelector("left_canvas").getContext("2d").drawImage("images/pillbug.png", xpos, ypos);
}
};
Full code completed to this point can be found here.