Creative Coding

p5.js 2.x Becomes the Default in the Web Editor — With WebGPU and TypeScript in Tow

The Processing Foundation flips the p5.js Web Editor to the 2.x line this month, making the WebGPU renderer, the p5.strands shader workflow, and TypeScript integration the out-of-the-box experience for the world's most popular creative-coding library.

This month the Processing Foundation switches the p5.js Web Editor to default to the 2.x release line — the culmination of a transition that began when p5.js 2.0 shipped in 2025 with a long, deliberate opt-in period. Because the browser-based editor is where most people first meet p5.js, flipping its default is the moment 2.x stops being an early-adopter choice and becomes the experience millions of learners land in by default. Crucially, 1.x isn’t going anywhere — it remains supported, and compatibility add-ons smooth the gap — but the center of gravity has moved.

Watch: p5.js 2.0 with Kit Kuksenok (YouTube)

What 2.x actually brings

The follow-on 2.1 and 2.2 releases fleshed out the line with the features that make the default switch consequential: a WebGPU-based renderer for faster, more capable graphics; improvements to p5.strands, the workflow for writing shader-driven visuals without dropping fully into raw GLSL; TypeScript integration for people who want types and editor autocomplete; an add-on Events API; and built-in color-contrast checking for web accessibility. The throughline is that p5.js is modernizing its graphics stack and developer ergonomics without abandoning the friendly, single-file sketch model that made it the default teaching tool for generative art.

Why the “default” matters more than the version number

Library version bumps are routine; changing what a beginner sees on first load is not. A student who opens the editor next week gets the WebGPU renderer and modern tooling without knowing to ask for them — which is how you actually move an ecosystem, rather than leaving improvements stranded behind a flag most people never flip. The Foundation’s slow, opt-in rollout (over a year of coexistence with 1.x) was designed precisely so this switch wouldn’t break the enormous back-catalog of sketches, tutorials, and course material built on 1.x.

The community angle

p5.js has always been as much a community project as a technical one, and 2.x continues that. The Foundation has paired the release with educational programming — including a collaboration bringing tutorials from well-known generative artists — to help the teaching ecosystem move with the code. For the creative coders this site follows, the practical takeaway is simple: new sketches started in the editor now sit on a faster, more modern renderer by default, and it’s worth knowing WebGPU and p5.strands are there when a piece outgrows the 2D canvas.