1. Creating Visuals with p5.js
  2. Start Learning
  3. p5.js Resources
    1. Books
    2. Websites
    3. Videos

Friday, Jun 27, 2025

# Creating Visuals with p5.js

p5.js is a graphics programming toolkit for JavaScript that provides an astounding level of expressivity and productivity. The feedback loop when working with p5.js is as close to instant as you can get. You can use it to make interactive graphics and animations in a short time and with only a few lines of code.

See the code.

The p5.js project describes itself as "a friendly tool for learning to code and make art." It's fun to play with, and might be dismissed as a toy, but p5.js can be used for serious programming and visualization, too.

p5.js is supported by groups at NYU, UCLA, CMU, and the Univerity of Denver, among others. It is actively developed and there are a tremendous number of resources available for it online and in print.

I have spent a few weeks using p5.js and found it inspiring, enjoyable, and I have learned new skills. For instance, I started playing with Godot Engine for game development after learning p5.js, and many concepts transfer over directly.

You can see a number of other p5.js examples here on my website to get an idea of some things you can make with p5.js.

# Start Learning

I'm not big on learning via videos in general—I prefer to read and play—but I was intrigued after coming across Patt Vira's video Interactive Bridge with Bouncing Balls. The sketch uses matter.js (a physics engine) and ml5.js (object tracking via webcam).

Video thumbnail for Interactive Bridge with Bouncing Balls

Inspired by her video, I signed up for Patt's Spark program, where she hosts an online creative space with light weekly guidance. Spark provides goals and learning materials, eliminating the effort of figuring out what to do next, and thus greatly accelerating your learning. I highly recommend it.

After just a few weeks building sketches in Spark, I'm confident enough to try using matter.js and ml5.js on my own. The foundations and explorations from the first few weeks boosted my confidence and explore some of the patterns and possibilities in p5.js, so it was undeniably worthwhile to start with some basic, fun sketches and gradually learn more.

# p5.js Resources

There are a lot of great resources for p5.js. And because p5.js is sponsored by universities and targeted at artists and other non-programmers, these resources are really pleasant to read. They are not white papers or technical specifications or growth hacker blogs filled with slop and marketing drivel.

# Books

# Websites

# Videos

There are obviously tons more videos out there, but these are not my preferred format so you can look around yourself.