| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| p5.esm.js | 2026-02-11 | 4.2 MB | |
| p5.js | 2026-02-11 | 4.4 MB | |
| p5.min.js | 2026-02-11 | 952.6 kB | |
| p5.zip | 2026-02-11 | 5.2 MB | |
| README.md | 2026-02-11 | 5.4 kB | |
| v2.2.1 source code.tar.gz | 2026-02-11 | 17.4 MB | |
| v2.2.1 source code.zip | 2026-02-11 | 18.3 MB | |
| Totals: 7 Items | 50.4 MB | 0 | |
What's Changed
This patch includes documentation, bugfixes, and dependency updates. A flatter p5.strands API is also included as part of ongoing incremental strands API.
You can get started with the features in this release using these sketches:
- p5 2.2.1 starter/demo with p5.strands buildFilterShader - demonstrates a filter shader using p5.strands
- p5 2.2.1 starter with WEBGPU - the WebGPU mode is new in 2.2, and released experimentally for community testing
The focus of this patch is performance improvements to WebGPU core add-on. You can load both p5.js and WebGPU mode by adding these two script tags to your sketch:
:::html
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.1/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.1/lib/p5.webgpu.js"></script>
Then load WebGPU mode in createCanvas:
:::js
async function setup() {
await createCanvas(400, 400, WEBGPU);
}
Read more about how it works and where we plan on taking it here!
What's Changed 🎊
- Fix rotation transformations outside of push/pop applying to main canvas in WebGPU by @davepagurek in https://github.com/processing/p5.js/pull/8423
- Make sure getTexture works in vertex shaders by @davepagurek in https://github.com/processing/p5.js/pull/8424
- Performance improvements for colors by @davepagurek in https://github.com/processing/p5.js/pull/8355
- fix textToModel regression for space characters by @skyash-dev in https://github.com/processing/p5.js/pull/8429
- add unit tests for HSB color space by @Piyushrathoree in https://github.com/processing/p5.js/pull/8376
- Experiment: flatter strands API by @davepagurek in https://github.com/processing/p5.js/pull/8314
- Auto return shader hooks by @vietnguyen2358 in https://github.com/processing/p5.js/pull/8384
- Fix
noiseDetail()in p5.js 2.x so that thefalloffparameter defaults to0.5when omitted. by @shuklaaryan367-byte in https://github.com/processing/p5.js/pull/8417 - Normalize strands noise output range to match JS noise() by @rakesh2OO5 in https://github.com/processing/p5.js/pull/8430
- fix createColorPicker ignores initial colour arg on chrome by @Piyushrathoree in https://github.com/processing/p5.js/pull/8363
- Add WebGL visual regression tests for transform functions by @aashu2006 in https://github.com/processing/p5.js/pull/8465
- Fix gifs in WebGL mode by @davepagurek in https://github.com/processing/p5.js/pull/8472
- feat(webgl): add global property support for p5.strands by @avinxshKD in https://github.com/processing/p5.js/pull/8211
- Webgpu perf updates by @davepagurek in https://github.com/processing/p5.js/pull/8480
- docs(p5.strands): document smoothstep by @jjnawaaz in https://github.com/processing/p5.js/pull/8459
- gitignore vscode local.code-workspace allowing users project-specific overrides by @nbogie in https://github.com/processing/p5.js/pull/8479
- fix(webgl): normalize nearly identical vertices before tessellation by @avinxshKD in https://github.com/processing/p5.js/pull/8221
- Remove deprecated, unmaintained vscode extension "npm" from recommendations by @nbogie in https://github.com/processing/p5.js/pull/8497
- Use --shallow in doc build to prevent documentation.js from processing GLSL imports by @nbogie in https://github.com/processing/p5.js/pull/8500
- Dependencies updates by @limzykenneth in https://github.com/processing/p5.js/pull/8360
- Add visual regression tests for WebGL 3D primitives by @aashu2006 in https://github.com/processing/p5.js/pull/8485
- Add transform support to bezier shapes in clip() by @VANSH3104 in https://github.com/processing/p5.js/pull/8481
- Fix instance mode usage of uniformFloat() in shader.modify() example by @aashu2006 in https://github.com/processing/p5.js/pull/8470
- More performance updates for WebGPU mode by @davepagurek in https://github.com/processing/p5.js/pull/8502
- More WebGPU optimizations by @davepagurek in https://github.com/processing/p5.js/pull/8510
- fix: use
@chainableper-overload by @LuLaValva in https://github.com/processing/p5.js/pull/8504 - add getTexture docs and examples for p5.strands by @nbogie in https://github.com/processing/p5.js/pull/8446
New Contributors
- @vietnguyen2358 made their first contribution in https://github.com/processing/p5.js/pull/8384
- @shuklaaryan367-byte made their first contribution in https://github.com/processing/p5.js/pull/8417
- @rakesh2OO5 made their first contribution in https://github.com/processing/p5.js/pull/8430
- @aashu2006 made their first contribution in https://github.com/processing/p5.js/pull/8465
- @jjnawaaz made their first contribution in https://github.com/processing/p5.js/pull/8459
- @LuLaValva made their first contribution in https://github.com/processing/p5.js/pull/8504
Stewards
This patch was stewarded (through code review, comments, and discussion) by
@davepagurek
@limzykenneth
@nbogie
@perminder-17
@ksen0
Full Changelog: https://github.com/processing/p5.js/compare/v2.2.0...v2.2.1