[p5.js] I don't know how to make it into a p5 file

LINK : Sea life sketch sketch - jagracar

Looking at the above,
You can see that it was made with p5.

Based on the above, I am trying to save it as p5.js using ‘Processing’.

File: WEB_FISH_TEST.zip - Google Drive

It does not work in the ‘processing’ program. Why?

You need to have <script> tags within your “index.html” file which loads all your required libraries & local files.

Take a look at my “DatGuiTest” online sketch’s “index.html” file:

1 Like


Thank you very much.

And there were several examples on that site.

Thank you for your consideration.

For whatever it’s worth I had to use the following to get it to run in p5.js Web Editor. Was unsuccessful in Processing IDE due to another error.

<script defer src="https://cdn.jsdelivr.net/gh/dataarts/dat.gui/build/dat.gui.min.js"></script> 

Note the addition of quotes and ‘https’ instead of ‘http’.

For simplicity I omit quotes for attribute values given it’s a minimalist “index.html” example.

Pretty much everything is ‘https://’ protocol now. That’s a very old sketch after all.

1 Like

very good!