p5.js welcomes libraries contributed by others! Check out the libraries tutorial for more specifics about how to create one. If you have created a library and would like to have it included in the list, follow the instructions below!
- Fork the repo
- Add a file to the
src/content/libraries/enfolder namedyourLibraryName.yaml(or consider copying an existing library as a starting point) - Inside it, add the following content:
name: The name of the librarycategory: A category that you think best fits your library. Your choices include:drawing,color,ui,math,physics,algorithms,3d,ai-ml-cv,animation,shaders,language,hardware,sound,data,teaching,networking,export, orutils.description: A one-sentence description of the libraryauthor: An object containingname, your name, andurl, an optional link to your website. If there are multiple authors, use an array of author objects.sourceUrl: A link to the library's source code (e.g. its repo on GitHub or GitLab)- (Optional)
websiteUrl: A link to a website for the library - (Optional)
npm: The package name for your library on npm, for examplep5.soundor@scope/my-library. - (Optional)
npmFilePath: Most libraries don't need this. First, openhttps://cdn.jsdelivr.net/npm/packageName. If it loads your library, you're all set. No need to include this field. If it doesn't load, browse your package athttps://www.jsdelivr.com/package/npm/packageNameand locate the JavaScript file that should be loaded (for exampledist/library.min.js), and setnpmFilePathto that relative path. featuredImage: The relative path to the preview thumbnail for the library.featuredImageAlt: a short description of the contents of the thumbnail for screen readers- (Optional)
license: A string describing the software license of the library. This may be omitted if your package is on npm and has license info there
- Add a high-res colored image of 1500x1000px of your library into
src/content/libraries/images - Submit a pull request and we'll review your submission
We add libraries that are open-source, include some documentation and examples, and follow our code of conduct. This directory targets beginner users, so we aim to ensure users have a smooth experience getting started with any library linked to.
If you have any questions, feel free to open an issue or create a work-in-progress PR and ask us anything!