Releases: processing/p5.js
v1.11.12
What's Changed
This p5.js v1 release reflects increasing stability of this version. Most of this patch is documentation updates, with a few bugfixes.
This patch also includes some notable updates in the project as a whole:
- @kitlord, @doradocodes, and @Nwakaego-Ego have been added as stewards on p5.js-web-editor and p5.js-website! @doradocodes has also been added to the maintainers team 🎉
- With extensive input, @SableRaf has updated our AGENTS.md file
- Thanks to a PR by @skyash-dev, the project now has a single, reusable image that includes all 800+ contributors. This is now also used on the main Processing Foundation people page
Bugfixes & FES
- fix: background(image) support in WEBGL by @reshma045 in #8333
- WebGL: Apply per‑vertex stroke color to POINTS by @yugalkaushik in #8380
- Suppress stroke warnings during buildGeometry by @skyash-dev in #8411
Documentation
- Update CONTRIBUTING.md links and add Discord invitation by @RishiAhuja in #8190
- Docs: fix typos and anchors by @nivanovvv in #8216
- docs: add nivanovvv as a contributor for doc by @allcontributors[bot] in #8217
- Add
AGENTS.mdby @SableRaf in #8194 - Add title to CONTRIBUTORS.md by @davepagurek in #8233
- docs: add nbogie as a contributor for bug, and code by @allcontributors[bot] in #8234
- docs: add SoundOfScooting as a contributor for code, and doc by @allcontributors[bot] in #8242
- Improve Accessibility Guidance for
describe()Usage (#8101) by @ksen0 in #8247 - docs: add VANSH3104 as a contributor for code by @allcontributors[bot] in #8258
- docs: add menacingly-coded as a contributor for doc by @allcontributors[bot] in #8292
- docs: add Homaid as a contributor for doc by @allcontributors[bot] in #8298
- Fix zh-Hans reference link by @nivanovvv in #8275
- docs: add Itsrajsk as a contributor for code by @allcontributors[bot] in #8306
- Updated point() examples for visible points in main branch. by @menacingly-coded in #8305
- Fix JSDoc return type for p5.Vector.cross by @Geethegreat in #8336
- docs: add Geethegreat as a contributor for code by @allcontributors[bot] in #8347
- docs: add Piyushrathoree as a contributor for code by @allcontributors[bot] in #8350
- docs: add Aayushdev18 as a contributor for code by @allcontributors[bot] in #8362
- Docs/fix broken links by @skyash-dev in #8399
- docs: add rakesh2OO5 as a contributor for code by @allcontributors[bot] in #8403
- docs: add doradocodes as a contributor for review by @allcontributors[bot] in #8425
- docs: add Nwakaego-Ego as a contributor for review by @allcontributors[bot] in #8427
- docs: add vietnguyen2358 as a contributor for code by @allcontributors[bot] in #8432
- feat: add accTitle/accDescr to class diagram in WebGL architecture doc by @coseeian in #8373
- docs: add shuklaaryan367-byte as a contributor for code by @allcontributors[bot] in #8433
- Add Nwakaego-Ego and doradocodes to stewards.yml by @ksen0 in #8460
- chore: update README table from stewards.yml by @ksen0 in #8461
- docs: add avinxshKD as a contributor for code by @allcontributors[bot] in #8483
- Add Iron-56 as p5.js-web-editor steward by @kitlord in #8486
- chore: update README table from stewards.yml by @ksen0 in #8488
- docs: add aashu2006 as a contributor for doc by @allcontributors[bot] in #8452
- Remove deprecated, unmaintained vscode extension "npm" from recommendations (main) by @nbogie in #8498
- Improve WebGL font error message to suggest textFont() usage by @yugalkaushik in #8494
- Fix WebGL shader and texture memory leak on sketch removal by @Sanchit2662 in #8418
- docs: add Sanchit2662 as a contributor for code by @allcontributors[bot] in #8503
- docs: add LuLaValva as a contributor for bug, and code by @allcontributors[bot] in #8511
- Add support for negative vertex indices in OBJ loader by @avinxshKD in #8507
- docs: add saurabh24thakur as a contributor for code, and test by @allcontributors[bot] in #8524
- Fix typo in createCanvas() reference example by @kajal-jotwani in #8527
- feat: generate contributors PNG for README by @skyash-dev in #8466
- chore: update contributors.png from .all-contributorsrc by @ksen0 in #8536
- Added p5.js Web Editor as an area for stewardship by @ksen0 in #8535
- docs: add imrinahru as a contributor for bug, code, and test by @allcontributors[bot] in #8561
- chore: update contributors.png from .all-contributorsrc by @ksen0 in #8562
- Add a link to the v2 guide to contributing to the reference by @nbogie in #8625
- docs: add skyash-dev as a contributor for code by @allcontributors[bot] in #8455
- docs: add jjnawaaz as a contributor for doc by @allcontributors[bot] in #8487
- chore: update contributors.png from .all-contributorsrc by @p5js-bot in #8632
- Update README by @ksen0 in #8633
- Add doradocodes to Maintainers team by @ksen0 in #8634
- chore: update README table from stewards.yml by @p5js-bot in #8635
- [TESTERS NEEDED] Rewrite AGENTS.md with community-first agent guidelines by @SableRaf in #8604
- Update Discord invite links in p5.js by @Nitin2332 in #8658
- Update contributor guidelines for issue usage and labels by @ksen0 in #8656
- docs: add Nitin2332 as a contributor for code by @allcontributors[bot] in #8657
- chore: update contributors.png from .all-contributorsrc by @p5js-bot in #8663
- Docs: fix incorrect colorMode() reference links by @mikhailbond1 in #8683
- docs: add geeta102 as a contributor for bug, and code by @allcontributors[bot] in #8684
- chore: update contributors.png from .all-contributorsrc by @p5js-bot in #8685
New Contributors
- @RishiAhuja made their first contribution in #8190
- @nivanovvv made their first contribution in #8216
- @coseeian made their first contribution in #8373
- @Sanchit2662 made their first contribution in #8418
- @kajal-jotwani made their first contribution in #8527
- @p5js-bot made their first contribution in #8632
- @mikhailbond1 made their first contribution in #8683
Full Changelog: v1.11.11...v1.11.12
v2.2.3
What's Changed
This patch contains bugfixes, documentation updates, and improvements in developer experience:
- A decorator API for further customisation of p5.js by addons without needing to duplicate or directly modify internal implementation. It is already used internally by FES parameter validation and provides a route towards additional accessibility oriented features. It is based on this proposal. (@limzykenneth)
- A fix enabling p5 global-mode typescript use, such as in this non-trivial example (@nbogie)
- Extensive update to the contributor documentation for testing 2.x p5.js reference locally (@nbogie)
- Bugfixes for p5.strands and WebGL (@davepagurek and @aashu2006)
- Other bugfixes, docs updates, and improvement (@avinxshKD , @codervinitjangir, @imrinahru , @MASTERsj01, @Nitin2332)
Try it out!
To use this patch, you can use this starter sketch!
Or load both p5.js and WebGPU mode by adding these two script tags to your sketch:
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.3/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.3/lib/p5.webgpu.js"></script>Then load WebGPU mode in createCanvas - note the async/await, this is needed for WebGPU but not WebGL:
async function setup() {
await createCanvas(400, 400, WEBGPU);
}If you take any existing sketch, such as from the intro to strands tutorial, you can switch from WEBGL to WEBGPU (async/await will be needed!)
Read more about how the WebGPU-based renderer works and where we plan on taking it here!
Developer experience
- Implement public decorator API by @limzykenneth in #8353
- add
export default p5at end of global.d.ts by @nbogie in #8299 - fix: replace raw console.log calls with p5._friendlyError across multiple modules (addresses #8621) by @MASTERsj01 in #8622
- skip FES checks on internal calls by @avinxshKD in #8517
Documentation updates
- fix strands filterColor example by @nbogie in #8569
- Update contributing_to_the_p5js_reference for p5 v2 by @nbogie in #8462
- change strands examples to use millis() not uniform by @nbogie in #8648
- Unescape < and > in inline code in docs by @davepagurek in #8661
- docs: remove deprecated beginGeometry() and endGeometry() references by @codervinitjangir in #8642
- Update Discord invite links in p5.js dev-2.0 by @Nitin2332 in #8659
- Sync 2.0 readme with 1.x by @ksen0 in #8664
WebGL and p5.strands bugfixes
- Handle booleans used as temp variables in p5.strands by @davepagurek in #8548
- Fix usage of perspective() with no args by @davepagurek in #8564
- Avoid unnecessary texture copies and fix flipped webcams in WebGL by @davepagurek in #8572
- Handle strands set() calls in branches and loops by @davepagurek in #8576
- Fix filter() crash on createGraphics(WEBGL) by mirroring strands API … by @aashu2006 in #8568
- Fix a bug where shared strands variables are detected in the wrong spot by @davepagurek in #8641
Other bugfixes
- fix: createGraphics inherits pixelDensity from parent sketch. by @imrinahru in #8558
- Reset mouseIsPressed on window blur by @avinxshKD in #8559
New Contributors
- @imrinahru made their first contribution in #8558
- @MASTERsj01 made their first contribution in #8622
- @codervinitjangir made their first contribution in #8642
Stewards & testers
Thanks to @nbogie @davepagurek for code review and @aashu2006 and @Jatin24062005 for additional support with testing the release candidates 🎉
Full Changelog: v2.2.2...v2.2.3
v1.11.12-rc.2
What's Changed
What's Changed 🎊
- [TESTERS NEEDED] Rewrite AGENTS.md with community-first agent guidelines by @SableRaf in #8604
- Update Discord invite links in p5.js by @Nitin2332 in #8658
- Update contributor guidelines for issue usage and labels by @ksen0 in #8656
- docs: add Nitin2332 as a contributor for code by @allcontributors[bot] in #8657
- chore: update contributors.png from .all-contributorsrc by @p5js-bot in #8663
Full Changelog: v1.11.12-rc.1...v1.11.12-rc.2
v2.2.3-rc.1
What's Changed
This is a release candidate (RC), which means it is not yet live on the p5.js Editor. Please help us to improve the stability of the newest version of p5.js by trying out this release candidate, and reporting bugs. To test this patch, you can use this starter sketch.
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.3-rc.1/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.3-rc.1/lib/p5.webgpu.js"></script>What's Changed 🎊
- Fix a bug where shared strands variables are detected in the wrong spot by @davepagurek in #8641
- add
export default p5at end of global.d.ts by @nbogie in #8299 - change strands examples to use millis() not uniform by @nbogie in #8648
Full Changelog: v2.2.3-rc.0...v2.2.3-rc.1
v2.2.3-rc.0
What's Changed
This is a release candidate (RC), which means it is not yet live on the p5.js Editor. Please help us to improve the stability of the newest version of p5.js by trying out this release candidate, and reporting bugs. To test this patch, you can use this starter sketch.
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.3-rc.0/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.3-rc.0/lib/p5.webgpu.js"></script>What's Changed 🎊
- fix: createGraphics inherits pixelDensity from parent sketch. by @imrinahru in #8558
- Handle booleans used as temp variables in p5.strands by @davepagurek in #8548
- Fix usage of perspective() with no args by @davepagurek in #8564
- Implement public decorator API by @limzykenneth in #8353
- fix strands filterColor example by @nbogie in #8569
- Reset mouseIsPressed on window blur by @avinxshKD in #8559
- Avoid unnecessary texture copies and fix flipped webcams in WebGL by @davepagurek in #8572
- Handle strands set() calls in branches and loops by @davepagurek in #8576
- Fix filter() crash on createGraphics(WEBGL) by mirroring strands API … by @aashu2006 in #8568
- skip FES checks on internal calls by @avinxshKD in #8517
- Update contributing_to_the_p5js_reference for p5 v2 by @nbogie in #8462
New Contributors
- @imrinahru made their first contribution in #8558
Full Changelog: v2.2.2...v2.2.3-rc.0
v1.11.12-rc.1
What's Changed 🎊
The next patch will contain various documentation improvements and WEBGL bugfixes. Highlight: the README now contain a single image of all the contributor icons! This allows both visibility and faster loading.
This is a release candidate (RC), which means it is not yet live on the p5.js Editor. Please help us to improve the stability of the newest version of p5.js by trying out this release candidate, and reporting bugs. To test this patch, you can use this starter sketch!
<script src="https://cdn.jsdelivr.net/npm/p5@1.11.12-rc.1/lib/p5.js"></script>Bugfixes (WEBGL)
- fix: background(image) support in WEBGL by @reshma045 in #8333
- Suppress stroke warnings during buildGeometry by @skyash-dev in #8411
- Fix WebGL shader and texture memory leak on sketch removal by @Sanchit2662 in #8418
- Add support for negative vertex indices in OBJ loader by @avinxshKD in #8507
- WebGL: Apply per‑vertex stroke color to POINTS by @yugalkaushik in #8380
Docs and Error Messages
- Update CONTRIBUTING.md links and add Discord invitation by @RishiAhuja in #8190
- Docs: fix typos and anchors by @nivanovvv in #8216
- docs: add nivanovvv as a contributor for doc by @allcontributors[bot] in #8217
- Add
AGENTS.mdby @SableRaf in #8194 - Add title to CONTRIBUTORS.md by @davepagurek in #8233
- docs: add nbogie as a contributor for bug, and code by @allcontributors[bot] in #8234
- docs: add SoundOfScooting as a contributor for code, and doc by @allcontributors[bot] in #8242
- Improve Accessibility Guidance for
describe()Usage (#8101) by @ksen0 in #8247 - docs: add VANSH3104 as a contributor for code by @allcontributors[bot] in #8258
- docs: add menacingly-coded as a contributor for doc by @allcontributors[bot] in #8292
- docs: add Homaid as a contributor for doc by @allcontributors[bot] in #8298
- Fix zh-Hans reference link by @nivanovvv in #8275
- docs: add Itsrajsk as a contributor for code by @allcontributors[bot] in #8306
- Updated point() examples for visible points in main branch. by @menacingly-coded in #8305
- Fix JSDoc return type for p5.Vector.cross by @Geethegreat in #8336
- docs: add Geethegreat as a contributor for code by @allcontributors[bot] in #8347
- docs: add Piyushrathoree as a contributor for code by @allcontributors[bot] in #8350
- docs: add Aayushdev18 as a contributor for code by @allcontributors[bot] in #8362
- Docs/fix broken links by @skyash-dev in #8399
- docs: add rakesh2OO5 as a contributor for code by @allcontributors[bot] in #8403
- docs: add doradocodes as a contributor for review by @allcontributors[bot] in #8425
- docs: add Nwakaego-Ego as a contributor for review by @allcontributors[bot] in #8427
- docs: add vietnguyen2358 as a contributor for code by @allcontributors[bot] in #8432
- feat: add accTitle/accDescr to class diagram in WebGL architecture doc by @coseeian in #8373
- docs: add shuklaaryan367-byte as a contributor for code by @allcontributors[bot] in #8433
- Add Nwakaego-Ego and doradocodes to stewards.yml by @ksen0 in #8460
- chore: update README table from stewards.yml by @ksen0 in #8461
- docs: add avinxshKD as a contributor for code by @allcontributors[bot] in #8483
- Add Iron-56 as p5.js-web-editor steward by @Iron-56 in #8486
- chore: update README table from stewards.yml by @ksen0 in #8488
- docs: add aashu2006 as a contributor for doc by @allcontributors[bot] in #8452
- Remove deprecated, unmaintained vscode extension "npm" from recommendations (main) by @nbogie in #8498
- Improve WebGL font error message to suggest textFont() usage by @yugalkaushik in #8494
- docs: add Sanchit2662 as a contributor for code by @allcontributors[bot] in #8503
- docs: add LuLaValva as a contributor for bug, and code by @allcontributors[bot] in #8511
- docs: add saurabh24thakur as a contributor for code, and test by @allcontributors[bot] in #8524
- Fix typo in createCanvas() reference example by @kajal-jotwani in #8527
- feat: generate contributors PNG for README by @skyash-dev in #8466
- chore: update contributors.png from .all-contributorsrc by @ksen0 in #8536
- Added p5.js Web Editor as an area for stewardship by @ksen0 in #8535
- docs: add imrinahru as a contributor for bug, code, and test by @allcontributors[bot] in #8561
- chore: update contributors.png from .all-contributorsrc by @ksen0 in #8562
- Add a link to the v2 guide to contributing to the reference by @nbogie in #8625
- docs: add skyash-dev as a contributor for code by @allcontributors[bot] in #8455
- docs: add jjnawaaz as a contributor for doc by @allcontributors[bot] in #8487
- chore: update contributors.png from .all-contributorsrc by @p5js-bot in #8632
- Update README by @ksen0 in #8633
- Add doradocodes to Maintainers team by @ksen0 in #8634
- chore: update README table from stewards.yml by @p5js-bot in #8635
New Contributors
- @RishiAhuja made their first contribution in #8190
- @nivanovvv made their first contribution in #8216
- @coseeian made their first contribution in #8373
- @Sanchit2662 made their first contribution in #8418
- @kajal-jotwani made their first contribution in #8527
- @p5js-bot made their first contribution in #8632
Full Changelog: v1.11.11...v1.11.12-rc.1
v2.2.2
What's Changed
This patch focuses on bugfixes, particularly on WebGPU performance and p5.strands. The goal is that all p5.strands shaders work with both WebGPU and WebGL canvases. This patch also adds millis() support inside strands code.
To use this patch, you can use this starter sketch!
Or load both p5.js and WebGPU mode by adding these two script tags to your sketch:
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.2/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.2/lib/p5.webgpu.js"></script>Then load WebGPU mode in createCanvas - note the async/await, this is needed for WebGPU but not WebGL:
async function setup() {
await createCanvas(400, 400, WEBGPU);
}If you take any existing sketch, such as from the intro to strands tutorial, iyou can switch from WEBGL to WEBGPU (async/await will be needed!)
Read more about how the WebGPU-based renderer works and where we plan on taking it here!
millis() supported in p5.strands
Here is a sketch (thanks @perminder-17!) showing millis() being used inside a strands shader. Previously, const t = uniformFloat(() => millis()); was needed. This can still be used, but you can instead use millis() directly:
// p5.js (WEBGL) sketch showing millis() driving a wavy displacement
let mat;
function setup() {
createCanvas(600, 400, WEBGL);
pixelDensity(1);
mat = baseMaterialShader().modify(() => {
// displace geometry in world-space based on y + time
getWorldInputs((inputs) => {
const wave = sin(inputs.position.y * 0.05 + millis() * 0.004);
inputs.position += [20, 25, 20] * wave;
return inputs;
});
});
}
function draw() {
background(15);
orbitControl();
// lights so the material shader looks nice
ambientLight(40);
directionalLight(255, 255, 255, 0.3, 0.6, -1);
// apply the modified material shader + draw some geometry
shader(mat);
noStroke();
// some rotation so you can see the displacement depth
rotateY(frameCount * 0.01);
rotateX(-0.25);
// a tall shape so Y-based waves are obvious
sphere(120, 80, 60);
}What does p5.strands make possible?
(Special thanks to @davepagurek for creating the sketches! Excerpted from a blog post about 2.2 updates.)
First, consider this sketch, which uses JavaScript loops to draw a cube of cubes. It is only 40 lines, but if there are many more cubes, it will slow down very much. If it is running smoothly, try changing all the “15” to a higher and higher number, such as “30.” As the scene grows, the sketch performance will suffer very noticeably.
The purpose of shader is to use parallel, GPU-based computation to speed this up. Instead of for loops, here is a second version of the same sketch using GLSL. It is 200 lines of code, and, if you are not familiar with GLSL, may be very difficult to read. Look for the “15” here, too, and try changing it to a larger number, like “30” or beyond. The shader-based animation remains smooth, showing the performance benefits of GPU rendering.
Finally, the p5.strands version of this sketch combines a more accessible, readable style of JavaScript with the performance of GLSL.
With the introduction of the WebGPU-based renderer, p5.strands sketches can seamlessly switch between WEBGL or WEBGPU renderer. Here is the same example as above, but using the WebGPU-based renderer. The only changes needed were to use async/await with createCanvas(...), and to import both the main library and the p5.webgpu.js add-on:
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.2/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.2/lib/p5.webgpu.js"></script>All Changes
- Refactor global node handling and add millis function by @perminder-17 in #8530
- 2.0 strands docs: add simple noise() example for buildFilterShader by @nbogie in #8521
- Sketch verifier: parse using the latest supported ECMAScript version by @dontwanttothink in #8522
- Add support for negative vertex indices in OBJ loader for 2.x by @avinxshKD in #8512
- Fix Show actual type in strands hook error messages by @Anshumancanrock in #8505
- Improve WebGL font error message to suggest textFont() usage by @yugalkaushik in #8513
- Fix/webgpu crash pixel density by @saurabh24thakur in #8476
- Fix WebGPU bugs surfaced by the Intro to Strands tutorial by @davepagurek in #8538
- Fix build*Shader methods in instance mode by forwarding optional scope by @aashu2006 in #8523
- Fix broken reference links in lerpColor() documentation (p5.js 2.0) by @rakesh2OO5 in #8518
- Fix WebGPU filter shader parameters being named differently than in WebGL by @davepagurek in #8546
- Updated readme and contributors for 2.0 branch by @ksen0 in #8556
- Updated readme and contributors for 2.0 branch (with attribution for image) by @ksen0 in #8557
New Contributors
- @dontwanttothink made their first contribution in #8522
- @Anshumancanrock made their first contribution in #8505
- @saurabh24thakur made their first contribution in #8476
Stewards
Code review and additional support with testing the release candidates by:
Full Changelog: v2.2.1...v2.2.2
v2.2.2-rc.2
What's Changed
The upcoming patch focuses on bugfixes and documentation, particularly on strands and WebGPU. Specifically, the goal is that all strands shaders work with both WebGPU and WebGL canvases.
This is a release candidate (RC), which means it is not yet live on the p5.js Editor. Please help us to improve the stability of the newest version of p5.js by trying out this release candidate, and reporting bugs. You can also share your thoughts or get involved on Discord in the #webpgu or #p5strands channels!
To test this patch, you can use this starter sketch!
Or load both p5.js and WebGPU mode by adding these two script tags to your sketch:
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.2-rc.2/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.2-rc.2/lib/p5.webgpu.js"></script>Then load WebGPU mode in createCanvas - note the async/await, this is needed for WebGPU but not WebGL:
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 WebGPU filter shader parameters being named differently than in WebGL by @davepagurek in #8546
Full Changelog: v2.2.2-rc.1...v2.2.2-rc.2
v2.2.2-rc.1
What's Changed
The upcoming patch focuses on bugfixes and documentation, particularly on strands and WebGPU. Specifically, the goal is that all strands shaders work with both WebGPU and WebGL canvases.
This is a release candidate (RC), which means it is not yet live on the p5.js Editor. Please help us to improve the stability of the newest version of p5.js by trying out this release candidate, and reporting bugs. You can also share your thoughts or get involved on Discord in the #webpgu or #p5strands channels!
To test this patch, you can use this starter sketch!
Or load both p5.js and WebGPU mode by adding these two script tags to your sketch:
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.2-rc.1/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.2-rc.1/lib/p5.webgpu.js"></script>Then load WebGPU mode in createCanvas - note the async/await, this is needed for WebGPU but not WebGL:
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 broken reference links in lerpColor() documentation (p5.js 2.0) by @rakesh2OO5 in #8518
- Refactor global node handling and add millis function by @perminder-17 in #8530
Full Changelog: v2.2.2-rc.0...v2.2.2-rc.1
v2.2.2-rc.0
What's Changed
The upcoming patch focuses on bugfixes and documentation, particularly on strands and WebGPU. Specifically, the goal is that all strands shaders work with both WebGPU and WebGL canvases.
This is a release candidate (RC), which means it is not yet live on the p5.js Editor. Please help us to improve the stability of the newest version of p5.js by trying out this release candidate, and reporting bugs. You can also share your thoughts or get involved on Discord in the #webpgu or #p5strands channels!
To test this patch, you can load both p5.js and WebGPU mode by adding these two script tags to your sketch:
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.2-rc.0/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.2-rc.0/lib/p5.webgpu.js"></script>Then load WebGPU mode in createCanvas - note the async/await, this is needed for WebGPU but not WebGL:
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 🎊
- 2.0 strands docs: add simple noise() example for buildFilterShader by @nbogie in #8521
- Sketch verifier: parse using the latest supported ECMAScript version by @dontwanttothink in #8522
- Add support for negative vertex indices in OBJ loader for 2.x by @avinxshKD in #8512
- Fix Show actual type in strands hook error messages by @Anshumancanrock in #8505
- Improve WebGL font error message to suggest textFont() usage by @yugalkaushik in #8513
- Fix/webgpu crash pixel density by @saurabh24thakur in #8476
- Fix WebGPU bugs surfaced by the Intro to Strands tutorial by @davepagurek in #8538
- Fix build*Shader methods in instance mode by forwarding optional scope by @aashu2006 in #8523
New Contributors
- @dontwanttothink made their first contribution in #8522
- @Anshumancanrock made their first contribution in #8505
- @saurabh24thakur made their first contribution in #8476
Full Changelog: v2.2.1...v2.2.2-rc.0