dead pooh
dead pooh

Reputation: 3

Fail to use load Image in p5.jg

When I use the HTML preview in Atom, everything looks fine. However, when I open the HTML file in Safari / Chrome, the page shows a word "loading" only. I think it is stuck in the preload() function. How should I fix the problem?

function preload()
{
  img  = loadImage("image/source.png");
}

function draw() 
{
  image(img,0,0);
}

Upvotes: 0

Views: 30

Answers (0)

Related Questions