Display Image

It is a very basic question, I am trying to load an image that is inside the same folder of the index.html file but I can't. Here the code of the sketch:

var img;
function setup() {
  createCanvas(windowWidth, windowHeight);

function draw() {

And here the code of the index.html:


  <script language="javascript" type="text/javascript" src="../../lib/p5.js"></script>
  <script language="javascript" type="text/javascript" src="sketch.js"></script>



What am I doing wrong? Thanks in advance!


Sign In or Register to comment.