Help! Why I cannot use the P5JS


I’m learning my Coursera courses about P5JS and I downloaded it ,however when I opened the sketch.js, (I didn’t do anything before open it .) I found there always have many errors… and when I tried to open the index.html as the course said, I only got a blank page.

First I thought maybe something wrong with my Brackets , so I downloaded the Atom , however , nothing changed.

Cuz I find the new user can only attaches one photo,so I make two photos into one. The former one is I thought maybe when I rewrite some codes , I won’t get errors ,but things didn’t go well. And the latter one is what the result I want to get.

Today is my first day to learn P5JS…I’m confused…Is there anything I did wrong?:frowning:
Thanks for everyone who giving me help!

1 Like

For an absolute beginner, my advice is to start on some p5js online editor, such as this 1: :man_student:
OpenProcessing.org/sketch/create

Some sketches I’ve got there btW: :grinning:

By using such specialized p5js online resources we don’t need to make our own “index.html” file. :wink:

When you decide it’s time to learn how to code your own “index.html” file, you can use more generic JS online editors, such as these 2 below: :sunglasses:


You can also take a look at my sketches I’ve got over there: :innocent:
CodePen.io/GoSubRoutine/pens/public

1 Like

thank u so much ! It’s really a nice website! :grinning: maybe when I get used to p5js , I can figure out what’s wrong in mine:)

You may attempt to run some of my sketches on your local IDE (Brackets, Atom) to see whether any of them work for you. :running_man:

But make sure to pick the 1s which contain both the “index.html” & “sketch.js” files: :raising_hand_man:

1 Like

Hey! I can run your sketches in my IDE!! Thank you! :innocent:

2 Likes