mrkeyoor.com_
Fri 11 Sept 13:55 UTC
Webevaluationupdated 11 Sept 2026

p5.js review

p5.js is a JavaScript library for drawing, animation, sound, interaction, and generative work in a web page. It gives artists, students, and developers a sketch-style API plus a browser editor, so an idea can become an interactive canvas without first assembling a web graphics stack.

trackingstars / 7d
Verdict

Our p5.js run built in 19 seconds, but its 2,577-test browser suite ended with 2 timeouts after 120 seconds, so contributors should budget for real browser debugging. Use p5.js for teaching, sketches, and interactive art when approachability matters more than a small dependency tree. For a production game renderer, a 3D scene engine, or deterministic multi-instance simulations, choose a narrower tool or verify the exact p5.js paths you depend on.

We ran it

Lab card: what happened when we ran p5.jsScreenshot of p5.js (p5js.org)
Install✓ · 56s1666 packages · 333 MB
Build✓ · 19s
Tests✗ · 120sran, no count parsed
Known vulns00 critical · 0 high · 0 moderate · 0 low (npm audit)
Repo2069 files~190,437 lines of source · 35.4 MB · 9 CI workflows · tests dir

Answers from our run

Does p5.js build from source?

Dependencies installed in 56 seconds (1666 packages), and the build succeeded in 19 seconds. We cloned commit ab97a16 into a clean Debian container with 3 CPUs and no project-specific setup.

Do p5.js's tests pass?

The test command failed in our container, and its output did not report a pass or fail count.

Does p5.js have known vulnerabilities in its dependencies?

npm audit found none in the dependency tree at the time of our run.

Who should not use p5.js?

Teams building forms, dashboards, or conventional product interfaces: the README defines p5.js around creative sketches and canvas work, not a component or application framework.

What are the alternatives to p5.js?

PixiJS, three.js, Paper.js. Our p5.

Setup3/5Sketch setup is easy; repo install took 56 seconds and 333 MB
Docs5/5Reference, tutorials, examples, editor, and contributor guides are linked
Community5/523,983 stars and active September 2026 releases and issue work
Maturity4/5Long-lived project on v2.3.3, with current 2.x regressions

Who it’s for

Artists and designers who want code to behave like a live sketchbook in the browser.
Teachers introducing programming through visible shapes, motion, input, and sound.
Developers making generative pieces, data-driven art, installations, or small interactive experiments.
Contributors comfortable testing graphics behavior across Chromium, Firefox, Safari, WebGL, and the newer WebGPU path.

Who it’s NOT for

Teams building forms, dashboards, or conventional product interfaces: the README defines p5.js around creative sketches and canvas work, not a component or application framework.
Node-only services or server-rendered jobs that cannot supply browser APIs: p5.js is a client-side web platform and its unit suite runs in Chromium.
Projects that require seeded Gaussian output to stay identical across multiple p5 instances today: open issue 9130 documents shared state that changes the sequence.
High-DPI image tools that repeatedly change pixel density: open issue 9152 reports compounded dimensions and a backing-canvas mismatch after resize.
Small contributor environments: our checkout installed 1,666 packages and used 333 MB before browser tests began.

Setup reality

Our npm install succeeded in 56 seconds, adding 1,666 packages and using 333 MB. The build passed in 19 seconds. Tests failed with exit code 1 after 120 seconds: 2 failed, 2,347 passed, 12 skipped, and 216 were marked todo out of 2,577. The log reports a 5,000 ms timeout, without showing its cause. Npm audit found 0 known vulnerabilities.

A sketch needs no account, API key, database, or server. The v2.3.3 release gives a jsDelivr script tag, and npm is available for bundled projects. Repository work uses an ES module toolchain with Rolldown, Vite, Vitest, Playwright, and Chromium.

Browser behavior is part of the operating cost. Canvas density, media, WebGL, optional WebGPU, and hardware limits can differ by device. A current Safari framebuffer report and open 2.x image issues make cross-browser visual tests necessary for shipped work.

A 400 by 400 canvas can start with two short functions

The p5.js README introduces the library with setup() creating a 400 by 400 canvas and draw() placing a circle at the mouse position. Drawing state, animation frames, pointer input, color, images, typography, and sound share one approachable vocabulary. The same library can move into WebGL or optional WebGPU when a sketch needs 3D work.

The friendliness sits on a substantial project. Our checkout contained 2,069 files, about 190,437 lines of source, and used 35.4 MB before dependencies. The scope includes rendering, math, media, input, accessibility work, error messages, documentation generation, and browser tests. Beginners do not have to understand that machinery to draw a shape.

One script tag is easy, while repository work installs 1,666 packages

Using the released library can be as small as a script tag. The v2.3.3 release publishes a jsDelivr URL for the standard build and another script for the optional WebGPU renderer. The project website links a browser editor, tutorials, examples, a reference, and community libraries.

Contributor setup is another scale. Our Node 22 container installed 1,666 npm packages in 56 seconds and ended with 333 MB of dependencies. The package scripts use Rolldown for builds, Vite for local preview, Vitest for tests, and Playwright with Chromium for browser execution. That is heavy for a small contribution.

What happened when we ran it

Our npm install succeeded in 56 seconds, and npm audit found 0 known vulnerabilities across the installed tree. The production build then completed successfully in 19 seconds. Those results show that commit ab97a16 could be installed and bundled in our unprivileged Debian sandbox with 3 CPUs and 8 GB of RAM. They do not measure sketch frame rate, browser compatibility, or visual correctness.

The test step failed with exit code 1 after 120 seconds. Its summary listed 2 failed, 2,347 passed, 12 skipped, and 216 todo out of 2,577 tests. At file level, 2 failed, 73 passed, and 4 were skipped out of 79. The log tail says Test timed out in 5000ms; it does not identify a system package, browser defect, or application cause. The defensible result is simply that the full command did not pass in our sandbox.

Version 2.3.3 caps GIF loads at 16,000,000 pixels

The September 7, 2026 patch release added a default MAX_GIF_PIXELS limit of 16,000,000 pixels to reduce the browser-memory risk from GIF decompression bombs. It also fixed quaternion multiplication and Friendly Error System parameter validation, then documented the newer Decorators API for addon authors. The patch addresses concrete input and error-reporting problems.

The repository also carries 9 CI workflow files and a tests directory, but no Dockerfile. That shape fits a client-side library whose important environment is the browser. Containerizing a static sketch will not settle differences in GPU support, pixel density, media permissions, or canvas output. Our 2 timed-out tests reinforce the need to run the specific Chromium, Firefox, Safari, WebGL, or WebGPU paths a published piece depends on.

Seeded randomness and high-DPI images still have open 2.x bugs

Issue 9130 reports that randomGaussian() keeps one cached value at module scope, so calls from a second p5 instance can change the first instance's seeded sequence. That matters for classrooms comparing outputs, generative editions, and tests that expect identical results from a fixed seed. The report targets the 2.x main branch and was still open when fetched. Teams using several sketches on one page should add a regression case around their random path.

Issue 9152 describes repeated pixelDensity(2) calls shrinking logical image dimensions and resize() losing the high-DPI backing size. The report says later get() and set() operations can address the wrong range. These open reports are more actionable than our 120-second timeout because they name reproducible library behavior. A plausible canvas does not prove that pixel operations are correct.

A September 11 push and v2.3.3 show active maintenance

GitHub listed 23,983 stars, 517 open issues and pull requests, and a last push on September 11, 2026. The latest release, v2.3.3, had shipped four days earlier. The combined open count is large, though it covers both pull requests and issues across a broad graphics API. Fresh patches and same-week issue discussion point to an active volunteer project, while the queue warns adopters to search for regressions in the exact renderer and browser they use.

Maturity does not make every 2.x edge predictable. Our run got 2,347 tests through before the command ended, yet 2 failures still made the suite red. The project openly routes different areas to named stewards and says maintainers are mostly volunteers. For teams shipping paid work, that means owning browser matrices and workarounds instead of treating community responsiveness as a service guarantee.

Choose p5.js for sketches and teaching, not conventional app structure

p5.js is a good first choice when the artifact is a sketch: generative art, a classroom exercise, an installation, or a small interactive explanation. Its API and web editor remove much of the ceremony between an idea and visible output. The cost appears later, when a piece depends on exact pixels, deterministic randomness, several browser engines, or sustained frame performance. The 333 MB contributor install is also far larger than the script-tag experience suggests.

Choose PixiJS when the center of the work is a fast 2D renderer, three.js for a deeper 3D scene stack, or Paper.js for vector geometry. Stay with p5.js when readable creative code is the priority and you can test the finished sketch on its real devices. Our successful 19-second build earns it a serious trial; the failed browser suite says that trial should include the behavior users will actually see.

Alternatives

ProjectWhat it isPick it when
PixiJSA 2D WebGL renderer aimed at fast interactive graphics and games.pick this instead when sprite throughput and a production rendering engine matter more than a beginner-friendly sketch API.
three.js gh↗A browser 3D library with direct scene, camera, material, and renderer control.pick this instead when the work is primarily 3D and you want a larger WebGL and WebGPU scene ecosystem.
Paper.jsA vector graphics scripting framework built around paths and a scene graph.pick this instead when editable vector geometry matters more than p5.js's broad creative-coding API.

What people are saying

  1. [velocity-scout] processing/p5.js

Sources

  1. p5.js README
  2. p5.js repository facts
  3. p5.js v2.3.3 release
  4. p5.js package manifest
  5. randomGaussian multi-instance issue 9130
  6. p5.Image pixel-density issue 9152
  7. Safari framebuffer issue 9138

More web reviews

lighthouse · video.js · fluentui · return-youtube-dislike · remix · bootstrap · the whole board →