# p5.js: 7.4 out of 10

A strong pick. 4th of 9 in [2D graphics and game engines](https://elestia.ai/opensource/2d-graphics/index.md).

p5.js is the Processing Foundation's creative-coding library for drawing, animation and interactive sketches on a canvas. Today it is the default choice for learning, generative art and quick visual prototypes. For games that need performance, physics or a scene graph, PixiJS or Phaser is the better fit.

**Best for:** Learners, teachers, artists and designers who want to make interactive canvas sketches, generative art or simple games fast.

## Scores

- **Overall: 7.4** (likely 6.4 to 8.4)
  - Claude Opus 5.5 (7.0): It is clearly the best pick for creative coding, teaching, generative art and simple interactive visuals. It is well maintained and funded. For performance-heavy 2D games, PixiJS and Phaser do the job better, and Konva or Fabric.js suit object-based canvas apps. The 2.0 migration and the LGPL licence are extra points to weigh.
  - GPT-6.2 Sol (7.8): For a new creative coding project, p5.js combines a small amount of setup with expressive drawing tools, current documentation, and active maintenance. Choose Phaser for a game that needs built-in scenes and physics, or PixiJS when sprite batching is central. The main uncertainties are large-scene performance in 2.4.0 and how quickly teaching materials and add-ons move to 2.x.
- **Needed by many: 4.1** (likely 3.0 to 5.1)
  - Claude Opus 5.5 (4.0): Drawing on a canvas is a clear niche within JS work, and p5's take on it is narrower still. It serves creative coding, teaching, generative art and simple visual tools. Most app developers never need it. Game developers tend to want an engine, and app builders want an object-model canvas library.
  - GPT-6.2 Sol (4.1): p5.js serves a distinct group making generative art, interactive graphics, classroom exercises, and small browser games. It works in ordinary browser projects without tying developers to a framework. The available studies describe these audiences well and give little basis for estimating their share of all JavaScript and TypeScript developers.
- **Helps a lot: 7.2** (likely 6.1 to 8.2)
  - Claude Opus 5.5 (6.5): For sketches and creative coding it is the best tool on offer. It has excellent docs, a simple API, 2D/WebGL/WebGPU modes and bundled types. It is clearly slower than PixiJS for heavy scenes and has no game-engine features, so for games a peer does the job better. The 2.0 API change means AI agents often write outdated 1.x code with preload().
  - GPT-6.2 Sol (7.8): Version 2.4.0 makes it easy to draw, animate, and handle input, with SVG support, built-in types, a detailed reference, and helpful diagnostics. Older examples can send coding agents toward the 1.x preload() API, and there is little direct evidence on how reliably agents generate 2.x code. Phaser supplies the game systems that p5.js leaves to the developer, while an independent moving-shapes benchmark shows browser-dependent results and gives limited evidence about current rendering performance.
- **Holds up over time: 8.1** (likely 7.1 to 9.1)
  - Claude Opus 5.5 (8.0): It is very active: 2,102 commits, 46 GitHub releases and 939 contributors, with a release on 2026-11-12. The non-profit Processing Foundation backs it, with grants and microgrants. The 1.x to 2.0 break was large, and 1.x is no longer maintained, which cost users work. The add-on libraries soften that.
  - GPT-6.2 Sol (8.2): Processing Foundation funding, shared stewardship, 2,102 commits, and 13 npm versions in the past year make continued maintenance likely. A user-reported TypeScript packaging regression was fixed in a patch eight days after it was reported. The 2.x asset-loading changes added real migration work for educators, and the open issue and pull request counts give limited insight into typical turnaround.
- **Used widely: 6.8** (likely 5.6 to 7.9)
  - Claude Opus 5.5 (6.5): npm downloads were 654k in the last 4 weeks, against 163k a year before. That ratio of about 4.0 is roughly at the 4.1 median, so p5 is holding its ground, not gaining it. Its npm numbers sit well below PixiJS, Phaser and Konva. Most real use goes through the CDN and the p5.js web editor, which npm does not count, and that is millions of student sketches. Dependent repos number 3,769, below Phaser and PixiJS but above Fabric.js.
  - GPT-6.2 Sol (7.0): Four-week npm downloads rose from 163,204 to 654,067, about 4.01× against the 4.1× catalog median, so p5.js lost a little ground by that measure. Its 3,769 indexed dependent repositories trail Phaser, PixiJS, and Konva. CDN and editor use escape npm counts, and an independent archive study found p5.js filenames in roughly 1.1 million historical repositories. That study catches copies and coursework, leaving the number of active projects choosing p5.js today uncertain.
- **Vouched for: 7.1** (likely 5.7 to 8.1)
  - Claude Opus 5.5 (6.5): It is a standard teaching tool in universities and creative-coding courses. It has public funders, including the Sovereign Tech Fund and GitHub's Secure Open Source Fund, and talks such as one at LGM 2026. It has little production use by companies and few independent benchmarks. Game developers rate it below PixiJS for performance.
  - GPT-6.2 Sol (7.6): Georgia Tech and King's College London teach with p5.js, and OpenProcessing supports it in its hosted sketch editor. An independent educator study records practitioners valuing its visual feedback and easy sharing. Most direct backing is for education and creative work, and evidence of satisfaction or sustained use in commercial game teams is sparse.
- **Safe: 6.6** (likely 5.5 to 7.7)
  - Claude Opus 5.5 (6.5): There are no OSV advisories ever, and the project has a security policy. The Scorecard is a middling 5.9, with zero for token permissions, signed releases and fuzzing. It pulls in 13 dependencies, which is many for a drawing library. The LGPL-2.1 licence is weak copyleft: it allows commercial use but adds compliance questions when bundled.
  - GPT-6.2 Sol (6.6): OSV lists zero advisories for p5, and the project has a published security response policy and a recent hardening patch. GitHub Actions produced the immutable 2.4.0 release, while the number of people with npm publishing access remains unverified. The package has 13 direct dependencies, and the 5.9 OpenSSF Scorecard flags weak workflow token permissions and static analysis, with zero scores for signed releases and fuzzing. LGPL-2.1 permits commercial use and adds redistribution obligations.

## Good

- It has a very beginner-friendly API, rich reference docs, a web editor and a huge library of tutorials and examples.
- It is very actively developed: over 2,000 commits and 46 releases in the last year, from a large contributor base under a non-profit foundation.
- One API covers 2D, WebGL and an experimental WebGPU mode, and p5.strands lets you write shaders in JavaScript.
- It has no known security advisories, and it is well funded for an open-source tool, with grants such as the Sovereign Tech Fund.

## Bad

- Rendering is slower than PixiJS or Phaser once a sketch draws many sprites or shapes.
- It has no built-in game features such as a scene graph, physics, tilemaps or asset pipelines.
- Version 2.0 broke 1.x code: preload() became async/await and the input and curve APIs changed. Much online and AI-generated code still uses the 1.x style.
- The LGPL-2.1 licence is weak copyleft, which some companies check carefully before bundling it into commercial apps.

## The numbers

- Downloads, 4 weeks: 654k
- In a year: ×4.0
- GitHub stars: 24k
- Commits, 12 months: 2.1k
- Last npm release: Nov 2026
- Advisories, 24 months: 0
- Licence: LGPL-2.1
- GitHub: https://github.com/processing/p5.js
- npm: https://www.npmjs.com/package/p5

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 21 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
