p5.js
A strong pick. 4th of 9 2D graphics and game engines.
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
Overall7.4
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 7.0, likely 6.0 to 8.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.
- github releasesLastYear: Active release train through v2.4.0.
- html5gamedevs.com/topic/47197-is-p5js-a-viable-canvas-library-for-use-in-game-development: Users advise moving to PixiJS when performance matters.
- github.com/processing/p5.js-compatibility: Breaking 2.0 changes.
GPT-6.2 Sol: 7.8, likely 6.8 to 8.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.
- github.com/processing/p5.js/releases/tag/v2.4.0: Current stable release improves drawing features and diagnostics.
- processingfoundation.report: Foundation funding and an established team support ongoing maintenance.
- docs.phaser.io/phaser/concepts/scenes: Phaser provides game scenes, cameras, and physics.
- pixijs.com/8.x/guides/concepts/performance-tips: PixiJS documents sprite batching for graphics-heavy scenes.
- github.com/makeabilitylab/p5js/issues/20: A teaching codebase documents the work involved in moving to 2.x.
Needed by many4.1
How many developers need a tool for this job?
Claude Opus 5.5: 4.0, likely 3.0 to 5.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.
- github description: Aimed at artists, designers, students and learners.
- html5gamedevs.com/topic/47197-is-p5js-a-viable-canvas-library-for-use-in-game-development: Game developers see p5 as a starter tool rather than an engine.
GPT-6.2 Sol: 4.1, likely 3.0 to 5.2
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.
- arxiv.org/html/2608.05174v2: Documents uses from still images to interactive installations and coursework.
- p5js.org/download: Supports a browser editor, standalone downloads, and CDN scripts.
- gamedevjs.com/dl/gamedevjs-survey-2025-report.pdf: Surveys web game developers and shows demand for dedicated engines.
Helps a lot7.2
How well does it do the job for those who need it?
Claude Opus 5.5: 6.5, likely 5.5 to 7.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().
- html5gamedevs.com/topic/47197-is-p5js-a-viable-canvas-library-for-use-in-game-development: A user calls p5 very limiting in terms of performance.
- github.com/processing/p5.js-compatibility: Lists the 2.0 breaking changes and the compatibility add-ons.
- newreleases.io/project/github/processing/p5.js/release/v2.3.0: Compute shaders through p5.strands on experimental WebGPU.
- npm hasTypes: Ships its own TypeScript types.
GPT-6.2 Sol: 7.8, likely 6.7 to 8.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.
- github.com/processing/p5.js/releases/tag/v2.4.0: Documents SVG import and export and improvements to the Friendly Error System.
- p5js.org/reference: Documents drawing, input, animation, and accessibility APIs.
- npmjs.com/package/p5?activeTab=code: Confirms bundled TypeScript declarations in 2.4.0.
- p5js.org/tutorials/v2_transition: Explains async asset loading and compatibility options for older sketches.
- docs.phaser.io/phaser/concepts/scenes: Documents scene management, cameras, and integrated physics.
- github.com/slaylines/canvas-engines-comparison: Informal moving-rectangle test favors PixiJS in Chrome and Firefox and p5.js in Safari.
Holds up over time8.1
Will it still be a good choice in two years?
Claude Opus 5.5: 8.0, likely 7.0 to 9.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.
- github commitsLastYear / releasesLastYear: 2,102 commits and 46 releases in the last year.
- github contributors: 939 contributors.
- processingfoundation.org/dev/open-source-software-microgrant-program: Microgrants for p5.js 2.0+ development in 2026.
- github.com/processing/p5.js-compatibility: v1 will not be maintained; compatibility add-ons exist.
GPT-6.2 Sol: 8.2, likely 7.1 to 9.1
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.
- github commitsLastYear, contributors, openIssues, openPullRequests: 2,102 commits, 939 contributors over the project's life, 412 open issues, and 134 open pull requests.
- npm versionsLastYear, latestVersion: 13 versions in the last year, with 2.4.0 current.
- processingfoundation.report: Reports funded development and maintenance, a project lead, and shared stewardship.
- github.com/processing/p5.js/issues/9190: User reported missing declarations on September 17, 2026.
- github.com/processing/p5.js/releases/tag/v2.3.4: September 25 patch restored the missing declarations.
- github.com/makeabilitylab/p5js/issues/20: University lab documents migration work for its teaching examples.
Used widely6.8
How many use it, and is that growing?
Claude Opus 5.5: 6.5, likely 5.5 to 7.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.
- npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 654k vs 163k, a ratio of about 4.0 against a 4.1 median.
- dependents repos: 3,769 repos, mid-pack among peers.
- github stars: 24k stars.
- p5.js web editor and CDN use: Heavy educational use that npm does not count.
GPT-6.2 Sol: 7.0, likely 5.7 to 8.3
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.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio: Downloads grew about 4.01× versus the catalog baseline of 4.1×.
- dependents repos, packages; peers dependentRepos: 3,769 indexed repositories and 239 packages, with three peers above 5,500 repositories.
- github stars; bluesky posts, top: 24,409 stars and 15 Bluesky links, with release announcements prominent.
- arxiv.org/html/2608.05174v2: A May 2025 archive snapshot reveals extensive use through vendored files.
- p5js.org/download: The official editor and CDN scripts let users start without npm.
Vouched for7.1
Who stands behind it being good?
Claude Opus 5.5: 6.5, likely 5.0 to 7.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.
- p5js.org/events/stf-2024: Sovereign Tech Fund grant for docs and accessibility.
- app.media.ccc.de/v/lgm-2026-110664-beginner-friendly-shader-programming-in-p5-js-v2: Conference talk on p5.js v2 shaders.
- hackerNews stories: 14 stories, mostly about teaching and art, with low points.
GPT-6.2 Sol: 7.6, likely 6.4 to 8.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.
- syllabus.gatech.edu/sites/default/files/2026-04/LMC_2700_F26_GTSyllabus_0.pdf: Fall 2026 course uses p5.js for graded labs and interactive projects.
- possibilityspace.org/cc: King's College London instructor publishes a current curriculum using p5.js.
- openprocessing.org/sketch/create: A separate hosted platform offers p5.js as a sketch mode.
- mcnutt.in/assets/tattoo.pdf: Educator interviews describe why visual teaching and shareable sketches work.
- gamedevjs.com/dl/gamedevjs-survey-2025-report.pdf: Names Phaser and PixiJS among game engine choices and gives no separate p5.js result.
Safe6.6
How safe is it to depend on?
Claude Opus 5.5: 6.5, likely 5.5 to 7.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.
- advisories total: No known advisories.
- scorecard score: 5.9; Token-Permissions, Signed-Releases and Fuzzing score 0.
- npm dependencies: 13 runtime dependencies.
- npm license: LGPL-2.1, a weak copyleft licence.
GPT-6.2 Sol: 6.6, likely 5.4 to 7.8
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.
- advisories total, last24Months: OSV records zero package advisories.
- npm dependencies, license: 13 direct dependencies and an LGPL-2.1 license.
- scorecard score, checks: 5.9 overall, with 0 for token permissions, signed releases, and fuzzing, and 2 for static analysis.
- github.com/processing/p5.js/security/policy: Documents reporting, review, and patching procedures.
- github.com/processing/p5.js/releases/tag/v2.4.0: Shows the immutable automated GitHub release and records the earlier hardening patch.
- opensource.org/license/lgpl-2-1: Specifies the LGPL-2.1 redistribution terms.
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
- npm downloads, 4 weeks
- 654k ×4.0 in a year
- GitHub stars
- 24k
- Commits, 12 months
- 2.1k
- npm version
- 2.4.0 Nov 2026
- Versions, 12 months
- 13
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- 5.9 out of 10, Nov 2026
- Licence
- LGPL-2.1
Read on 21 November 2026 from GitHub (processing/p5.js), npm (p5), OSV and the OpenSSF Scorecard.