1

literally just got into the world of coding, so if my question seems absolutely insane, I do apologise.

Anywho, was following some tutorials (Daniel Shiffman's https://www.youtube.com/watch?v=HZ4D3wDRaec) how to setup a basic p5.js file on Atom, and generate a green window to test if the code is working. Really basic setup, nothing should've went wrong.

For some reason the text editor wouldn't read my code while I was typing; so then I clicked on the index.html file from the root folder.

Instead of having to show a green window, nothing actually happened. I don't know if this is a software issue, seems like nobody has encountered such a basic problem.

Nothing seems to be wrong here. And it opened a white window when it should've been green

James Z
  • 12,209
  • 10
  • 24
  • 44
wardrobefanatic
  • 101
  • 1
  • 3
  • Welcome to [so]. Please show your file content as code rather than as images, as it makes things easier for ops. Some good practices here can help you: [mcve]. Could you show your index.html file also? – PJProudhon Oct 01 '19 at 07:47
  • Take a look at the developer tools of Atom (or the browser you're using). Are there any errors shown in the console or the network tab? – idleberg Oct 01 '19 at 07:48

1 Answers1

0

You might have missed a couple of steps in the video:

  1. You can simply (manually) double click index.html from the yayme folder on your Desktop. This should open your default browser with the page. This works for simple sketches but once you start loading assets (images/sounds/data from other sites, etc.) it's best to use a local web server
  2. You can use any http server as Daniel Shiffman's video mentions or the atom-live-server package (notice the install button on that page which will open Atom for you). Once that's installed you can access it via Atom > Packages> atom-live-server
George Profenza
  • 50,687
  • 19
  • 144
  • 218
  • Hi, I did these exactly the steps, however it just wouldn't do anything, which is why I was quite confused – wardrobefanatic Oct 02 '19 at 02:10
  • Must be something else then. Can you please post your index.html file and check the JavaScript Console in your browser for errors (and post them off any). – George Profenza Oct 02 '19 at 05:49