p5Catalyst is a GUI framework that wraps your p5.js
sketches into polished, interactive web apps—ready for real-time control, asset exporting and daily use. Whether you’re building generative art, data visualizations, or dynamic brand systems, p5Catalyst gives your sketches the structure and tooling they need to go beyond the sketchpad—into production, publication, or public play.
Initiated by creative agency Multitude, p5Catalyst grew out of real-world branding needs, and is now shared as a creative coding tool for everyone.
localStorage
.At Multitude, we believe branding should be fluid, flexible, and future-proof. Instead of static design systems, we embrace generative branding, where design systems evolve and adapt in real-time.
We originally started building p5Catalyst to give our clients control over the generative brand systems we designed. Now we’re sharing it to help other creative coders do the same, and more!
Let’s build the future of generative design!
To run p5Catalyst locally, follow these steps.
git clone https://github.com/multitude-amsterdam/p5Catalyst.git YOUR_NEW_APP
or alternatively, download the code as a ZIP file by clicking the “<> Code” button at the top-right of this page. ↗️
The /app
directory holds the runnable website. You need to start a local web server (a “dev server”) in this folder to use p5 and the other libraries. Opening the index.html
file will not work on its own. Here are some options to do this in a command prompt window:
First, open a command prompt and navigate to the /app
directory.
cd /Users/You/Your Github Folder/YOUR_NEW_APP/app
If you have Python installed:
python3 -m http.server 8000
If you have Node.js installed:
npx http-server -p 8000
If you PHP installed:
php -S localhost:8000
The app will be up and running at http://localhost:8000
.
More on running local web servers by Mozilla.
generator.js
The Generator
class in generator.js is designed to correspond with the setup()
and draw()
functions in p5. You can copy/paste your sketches in there. You won’t need to use createCanvas()
, as there is a canvas
object available already. There is also some structure in place to help you get started with using shaders as well.
class Generator {
static name = 'Project Name';
...
setup() {
// your sketch's setup() here
...
}
draw() {
// your sketch's draw() here
...
}
...
}
create-gui.js
There is a custom set of GUI controller classes that can be used, including sliders, text boxes, buttons, colour selectors, dropdowns and a toggle. You can add custom callback functions to handle the data from these DOM elements.
...
gui.addController(new ColourBoxes(
gui, 'colourBoxesBirdCol', 'Bird flock colour', generator.birdPalette, 0,
(controller, value) => {
generator.birdCol = value;
}
), doAddToRandomizerAs=true);
gui.addController(new XYSlider(
gui, 'xySliderBirdTarget', 'Bird flock target',
0, width, width / 2, 1,
0, height, height / 2, 1,
(controller, value) => {
generator.imagePosition.set(value.x, value.y);
}
), doAddToRandomizerAs=true);
...
Note: adding the doAddToRandomizerAs
argument will add a die button (🎲) to the controller. It indicates whether the controller will be randomized when the Randomize button is clicked. Adding it as false
will also add it to the controller, but it will load as the ‘off’ state. See how this works in the demo. This is practical for users to take control of the randomization of the sketch.
style.css
Most of the styling variables can be found under :root
, like colours, sizes and font settings.
:root {
...
--gui-base-col: #7685F7;
--gui-hover-col: #BFFB50;
...
}
[!TIP] For more insight into the relationship between script files, visit the documentation of the code architecture.
That’s it! You can now host the application 😶🌫️ and send it to your client or users for testing. Just copy the contents of the /app
folder into the root of your server environment using FTP or otherwise.
We encourage you to make modifications, improvements, or entirely new generators, it’s easier than you think! For more information on contributing, continue reading here.
For security concerns, please review the security policy.
You can find more information on the specifics of the codebase in the online documentation.
We kindly ask: if you make something cool with p5Catalyst, please share it! Whether it’s a wild new web app, an adaptation for a client, or just a fun remix, we’d love to see it 👀!
Keep in mind the Community Code of Conduct for this project.
Developed using p5.js, p5.js-svg, toxiclibs.js, and ffmpeg.wasm.
This project is licensed under the MIT License: free to use and modify.
Follow the development and join the discussion: