Background Image?

edited December 2014 in p5.js

For some reason, I cannot get a background image onto a sketch I'm working on. I followed the instructions here but it is not working: http://p5js.org/learn/examples/Image_Background_Image.php

I took out all my other code to just focus on this issue:

var bg;

function setup() {

  bg = loadImage("img.jpg");
  createCanvas(1024, 768);
}

function draw() {
  background(bg);
}

Here is my image. It is located in the same folder as my index.html and sketch.js

img

Answers

Sign In or Register to comment.