- Script 10 - Libraries
With this script you
- get to know external libraries, and
- know how to include them in OpenProcessing.
You can find a list of the currently supported p5 libraries here: https://p5js.org/libraries/
One of my favorite p5 libraries at the moment, is ml5 for using machine learning in an accessible and easy way.
A library to create a scribble effect:
A library to create a a touch gui:
Depending on your tasks, using a library can make your life much easier. In coding, you never want to reinvent the wheel (well, I guess that applies to life in general ;) ).
If a library is listed on the official p5 website, you can be fairly certain that it is of a certain quality. However, keep in mind that code structure and its documentation might be different from what you are used to from p5. Again, libraries are usually not coming from the p5 team.
OpenProcessing makes is rather easy for us to use a library. Go the menu on the right side of a sketch and go to the
Sketch tab. At the bottom you see a list of supported libraries, which you can simply select to use it in your current sketch.
- Libraries extend the p5 library in regard to one specific topic.
- You have to activate a library for a sketch in openProcessing.
- For knowing how to use a library you have to refer to the library’s given documentation, it is not necessarily on the p5 page.
📚 🗃 🤹🏾