v2.4.02026-11-12
p5.js version 2.4.0 expands graphics possibilities for scalable vector graphics (SVG), 3D model materials, and transforming (like rotating or scaling) 3D models in your sketch. The loading animation has been updated, and a new API call loadingAnimation(...) allows turning the default animation off, or replacing it with your own sketch!
<img width="1000" alt="A galaxy of purple stars with the label p5.js 2.4" src="https://github.com/user-attachments/assets/8bb5510e-4423-422b-8d93-d441b33c6476" />
Sketch by Dave Pagurek, using p5.strands with the instancing API and matrix transformations features added in 2.4.0. Fork the sketch here!
To use 2.4, you can use this starter sketch.
Or 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.4.0/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.4.0/lib/p5.webgpu.js"></script>
`
Then load WebGPU mode in createCanvas - note the async/await, this is needed for WebGPU but not WebGL:
`js
async function setup() {
await createCanvas(400, 400, WEBGPU);
}
`
Patches between 2.3 and 2.4
Starting with 2.3.2, we changed the release process. While work on the 2.4 release continued in the main branch, atomic patches made security updates and bugfixes available sooner. Want to help test? Check the release notes below and ensure everything from prior patches still works as expected.
* 2.3.1 This patch introduces new p5.strands features, improvements to shapes & SVG handling, and bugfixes across WebGL and WebGPU. It also renames the color space previously called HDR to P3 for accuracy.
* 2.3.2 This patch improves 2D paths and adds a loading animation to display when setup() takes a long time.
* 2.3.3 This patch release includes a security hardening measure, a couple of bugfixes, and documentation updates.
* 2.3.4 Bugfixes/CI, fixed TypeScript declarations generation
New in 2.4: SVG Support
* @VANSH3104 added SVG import/export in #9123. Usage and examples shown in this playlist. p5.js 2.4 will support this out of the box with no additional imports needed. With thanks to @davepagurek for reviews, and @mingness for project mentorship.
* @Danyccsf @Prbhtsgh also worked on SVG-related bugfixes in #9261, #9292, 9322, 9373
New in 2.4: Custom Loading Animations
In #9119 and #9365, @Jextic implemented improvements to the default loading animation (originally introduced in 2.3.2). This rework of the loading indicator uses canvas-based animations and p5.js syntax. In instance mode, each sketch gets its own indicator, with overlay positioning fixed relative to the canvas. From 2.4, the default animation will be a spinning p5.js star. With thanks to @SableRaf for design guidance. Reviewed by @limzykenneth @davepagurek @ksen0.
Users can turn off the default animation, or write their own. To check the default, try:
`js
async function setup() {
createCanvas(400, 400);
await new Promise(r => setTimeout(r, 10000));
}
function draw() {
background(220);
}
`
To turn of the animation / opt out, use loadingAnimation():
`js
async function setup() {
createCanvas(400, 400);
loadingAnimation();
await new Promise(r => setTimeout(r, 10000));
}
function draw() {
background(220);
}
`
You can also make your own custom loading animation by defining a function and passing it in as a parameter to loadingAnimation(myLoader). To try this out, fork this example!.
p5.strands API additions and bugfixes in 2.4
p5.strands is a feature in p5.js 2.x for authoring shaders using JavaScript. See: "Hello Color World" tutorial and p5.strands contribution guide. This feature in active development. New additive features added in this release:
* @aashu2006 added a simplified instancing API for p5.strands. Read more here (Starting with #8878 and #8912 which was part of 2.3.1, but with most of the work shipping in 2.4 with #8952). Thanks to @davepagurek and @eupthere for your reviews on this feature!
* @perminder-17 added transformation matrix support in #8984.
* Add stateful helpers for p5.strands addons by @bhabishnu in https://github.com/processing/p5.js/pull/9309
The below sketch shows these features in the t variable (a 3D transform that includes rotation and translation), and in the instances(count).box(18) line:
<img width="157" height="158" alt="image" src="https://github.com/user-attachments/assets/81dae836-719e-4722-8689-b4ef9734dbe9" />
`js
let myShader;
let count = 10;
function setup() {
createCanvas(200, 200, WEBGL);
myShader = buildMaterialShader(placeOnRing);
}
function placeOnRing() {
worldInputs.begin();
let angle = instanceIndex TWOPI / count + millis()/1000;
let t = transform3D();
t = rotateY(t, angle);
t = translate(t, 65, 0, 0);
worldInputs.position = transformPoint(t, worldInputs.position);
worldInputs.normal = transformNormal(t, worldInputs.normal);
worldInputs.end();
}
function draw() {
orbitControl();
background('purple');
lights();
directionalLight(255, 255, 255, 0, 1, 0);
directionalLight(255, 255, 255, 0, -1, 0);
ambientLight(255, 100, 0);
noStroke();
fill('pink');
shader(myShader);
instances(count).box(18);
}
`
loadModel() in 2.4: Multi-Material Support
Compare loadModel() materials support in 2.3.4 and in 2.4.0 in this sketch:
<img width="1476" height="544" alt="Screenshot2026-10-2900-54-26" src="https://github.com/user-attachments/assets/5811f0eb-3573-4b0d-813e-154f9481cc45" />
<details>
<summary>
@Nixxx19 added support for multi-material model support. This is not an API change, but a big update in loadModel() for .obj` files with multiple materials. With thanks to @davepagurek for reviews, and @diyaayay for project mentorship.
</summary>
* GSOC 26: multi-material model parts (obj/mtl) by @Nixxx19 in https://github.com/processing/p5.js/pull/8879
* GSOC 26: render multi-material models per part by @Nixxx19 in https://github.com/processing/p5.js/pull/8955
* GSOC 26: multi-material buildGeometry by @Nixxx19 in https://github.com/processing/p5.js/pull/9063
* GSOC 26: multi-material .mtl loading test coverage by @Nixxx19 in hhttps://openprocessing.org/@p5js/3060995ttps://github.com/processing/p5.js/pull/9065
* GSOC 26: specular, ambient, and shininess texture maps by @Nixxx19 in https://github.com/processing/p5.js/pull/9066
* GSOC 26: custom vertex attributes in multi-material buildGeometry by @Nixxx19 in https://github.com/processing/p5.js/pull/9077
* GSOC 26: normal (bump) map support by @Nixxx19 in https://github.com/processing/p5.js/pull/9067
* GSOC 26: document multi-material and texture map support by @Nixxx19 in https://github.com/processing/p5.js/pull/9068
* GSOC 26: bumpTexture() for height maps by @Nixxx19 in https://github.com/processing/p5.js/pull/9089
* GSOC 26: keep bump map slopes correct at image edges by @Nixxx19 in https://github.com/processing/p5.js/pull/9095
* GSOC 26: multi-material audit, edge cases, and a windows path fix by @Nixxx19 in https://github.com/processing/p5.js/pull/9096
v2.4.0-rc.6预发布2026-11-06
Testers Wanted 💚
p5.js version 2.4 will be ready soon. Help testing it by trying your existing sketches with the new version, or by trying out the upcoming features! This is a release candidate (RC), which means it is not yet live on the p5.js Editor. Your help with testing now will help make the release more stable!
To help with testing, you can use this starter sketch.
Or 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.4.0-rc.6/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.4.0-rc.6/lib/p5.webgpu.js"></script>
`
Then load WebGPU mode in createCanvas - note the async/await, this is needed for WebGPU but not WebGL:
`js
async function setup() {
await createCanvas(400, 400, WEBGPU);
}
``
Testing this Release
Check the changes in the full notes, test with existing sketches or by writing new sketches that use new functionality (like SVG, p5.strands instancing, custom loading animations, or multi-material 3D models), and report any issues you find to help prepare this version for release.
🎊🎉 Please check the last Release Candidate's full notes for all the detailed information!
What's changed since the previous RC
* Fix: Add property w JSDoc block after property #8154 by @vamshi567bh in https://github.com/processing/p5.js/pull/8936
* Issue 9100 by @Jextic in https://github.com/processing/p5.js/pull/9116
New Contributors
* @vamshi567bh made their first contribution in https://github.com/processing/p5.js/pull/8936
Full Changelog: https://github.com/processing/p5.js/compare/v2.4.0-rc.5...v2.4.0-rc.6
v2.4.0-rc.5预发布2026-11-05
Testers Wanted 💚
p5.js version 2.4 will be ready soon. Help testing it by trying your existing sketches with the new version, or by trying out the upcoming features! This is a release candidate (RC), which means it is not yet live on the p5.js Editor. Your help with testing now will help make the release more stable!
To help with testing, you can use this starter sketch.
Or 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.4.0-rc.5/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.4.0-rc.5/lib/p5.webgpu.js"></script>
`
Then load WebGPU mode in createCanvas - note the async/await, this is needed for WebGPU but not WebGL:
`js
async function setup() {
await createCanvas(400, 400, WEBGPU);
}
`
Testing this Release
Check the changes in the full notes, test with existing sketches or by writing new sketches that use new functionality (like SVG, p5.strands instancing, custom loading animations, or multi-material 3D models), and report any issues you find to help prepare this version for release.
🎊🎉 Please check the last Release Candidate's full notes for all the detailed information!
What's changed since the previous RC
* Re-enable strict mode in bundled version and fix this` reference by @limzykenneth in https://github.com/processing/p5.js/pull/9370
* fix(svg): don't render <symbol> elements outside <defs> on import by @Prbhtsgh in https://github.com/processing/p5.js/pull/9373
Full Changelog: https://github.com/processing/p5.js/compare/v2.4.0-rc.4...v2.4.0-rc.5
v2.4.0-rc.4预发布2026-11-05
Testers Wanted 💚
p5.js version 2.4 will be ready soon. Help testing it by trying your existing sketches with the new version, or by trying out the upcoming features! This is a release candidate (RC), which means it is not yet live on the p5.js Editor. Your help with testing now will help make the release more stable!
To help with testing, you can use this starter sketch.
Or 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.4.0-rc.4/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.4.0-rc.4/lib/p5.webgpu.js"></script>
`
Then load WebGPU mode in createCanvas - note the async/await, this is needed for WebGPU but not WebGL:
`js
async function setup() {
await createCanvas(400, 400, WEBGPU);
}
``
Testing this Release
A few features that are planned for 2.4 are still in progress. Check the changes below, test with existing sketches or by writing new sketches that use new functionality (like SVG, p5.strands instancing, custom loading animations, or multi-material 3D models), and report any issues you find to help prepare this version for release.
🎊🎉 Please check the last Release Candidate's full notes for all the detailed information!
What's changed since the previous RC 🎊
* Fixed loading overlay and actual canvas parenting synchronization bug by @Jextic in https://github.com/processing/p5.js/pull/9365
* Fix isDone assignment in onended() reference example by @BhumitSahani in https://github.com/processing/p5.js/pull/9346
* Handle minified conditionals in p5.strands by @davepagurek in https://github.com/processing/p5.js/pull/9364
Full Changelog: https://github.com/processing/p5.js/compare/v2.4.0-rc.3...v2.4.0-rc.4
v2.4.0-rc.3预发布2026-11-03
<!-- Release notes generated using configuration in .github/release.yml at v2.4.0-rc.3 -->
Testers Wanted 💚
p5.js version 2.4 will be ready soon. Help testing it by trying your existing sketches with the new version, or by trying out the upcoming features! This is a release candidate (RC), which means it is not yet live on the p5.js Editor. Your help with testing now will help make the release more stable!
To help with testing, you can use this starter sketch.
Or 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.4.0-rc.3/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.4.0-rc.3/lib/p5.webgpu.js"></script>
`
Then load WebGPU mode in createCanvas - note the async/await, this is needed for WebGPU but not WebGL:
`js
async function setup() {
await createCanvas(400, 400, WEBGPU);
}
``
Testing this Release
A few features that are planned for 2.4 are still in progress. Check the changes below, test with existing sketches or by writing new sketches that use new functionality (like SVG, p5.strands instancing, custom loading animations, or multi-material 3D models), and report any issues you find to help prepare this version for release.
🎊🎉 Please check the last Release Candidate's full notes for all the detailed information!
Since the previous release candidate
* fix(strands): preserve loop state updated before break by @bhabishnu in https://github.com/processing/p5.js/pull/9354
* Fix paletteLerp() returning undefined outside p5.strands by @LalitNarayanYadav in https://github.com/processing/p5.js/pull/9347
* Fix storage element type check and FES parameter data for createStorage/buildComputeShader by @aashu2006 in https://github.com/processing/p5.js/pull/9355
* Keep dependencies as package imports in the dist build by @Akshats-git in https://github.com/processing/p5.js/pull/9351
* Make media elements and createCapture() work in WebGPU by @davepagurek in https://github.com/processing/p5.js/pull/9358
Full Changelog: https://github.com/processing/p5.js/compare/v2.4.0-rc.2...v2.4.0-rc.3
v2.4.0-rc.2预发布2026-10-29
Testers Wanted 💚
p5.js version 2.4 will be ready soon. Help testing it by trying your existing sketches with the new version, or by trying out the upcoming features! This is a release candidate (RC), which means it is not yet live on the p5.js Editor. Your help with testing now will help make the release more stable!
To help with testing, you can use this starter sketch.
Or 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.4.0-rc.2/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.4.0-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:
`js
async function setup() {
await createCanvas(400, 400, WEBGPU);
}
`
Testing this Release
A few features that are planned for 2.4 are still in progress. Check the changes below, test with existing sketches or by writing new sketches that use new functionality (like SVG, p5.strands instancing, custom loading animations, or multi-material 3D models), and report any issues you find to help prepare this version for release.
What's New in 2.4
To help with testing, you don't need to test every single thing. It is very helpful to pick something you're familiar with in p5, and dig into it, especially looking for strange behavior in edge cases. You can pick any section or pull request below, and focus your testing on that.
Patches between 2.3 and 2.4
Starting with 2.3.2, we changed the release process. While work on the 2.4 release continued in the main branch, atomic patches made security updates and bugfixes available sooner. Want to help test? Check the release notes below and ensure everything from prior patches still works as expected.
* 2.3.1 This patch introduces new p5.strands features, improvements to shapes & SVG handling, and bugfixes across WebGL and WebGPU. It also renames the color space previously called HDR to P3 for accuracy.
* 2.3.2 This patch improves 2D paths and adds a loading animation to display when setup() takes a long time.
* 2.3.3 This patch release includes a security hardening measure, a couple of bugfixes, and documentation updates.
* 2.3.4 Bugfixes/CI, fixed TypeScript declarations generation
New in 2.4: SVG Support
* @VANSH3104 added SVG import/export in #9123. Usage and examples shown in this playlist. p5.js 2.4 will support this out of the box with no additional imports needed. With thanks to @davepagurek for reviews, and @mingness for project mentorship.
* @Danyccsf also worked on SVG-related bugfixes in #9261 and #9292
* fix(svg): handle p5.Vector in translate() and support resetMatrix() in SVG recorder by @Prbhtsgh in https://github.com/processing/p5.js/pull/9322
New in 2.4: Custom Loading Animations
In #9119, @Jextic implemented improvements to the default loading animation (originally introduced in 2.3.2). This rework of the loading indicator uses canvas-based animations and p5.js syntax. In instance mode, each sketch gets its own indicator, with overlay positioning fixed relative to the canvas. From 2.4, the default animation will be a spinning p5.js star. With thanks to @SableRaf for design guidance. Reviewed by @limzykenneth @davepagurek @ksen0.
Users can turn off the default animation, or write their own. To check the default, try:
`js
async function setup() {
createCanvas(400, 400);
await new Promise(r => setTimeout(r, 10000));
}
function draw() {
background(220);
}
`
To turn of the animation / opt out, use loadingAnimation():
`js
async function setup() {
createCanvas(400, 400);
loadingAnimation();
await new Promise(r => setTimeout(r, 10000));
}
function draw() {
background(220);
}
`
You can also make your own custom loading animation by defining a function and passing it in as aparameter to loadingAnimation(myLoader). To try this out, fork this example!.
p5.strands API additions in 2.4
p5.strands is a feature in p5.js 2.x for authoring shaders using JavaScript. See: "Hello Color World" tutorial and p5.strands contribution guide. This feature in active development. New additive features added in this release:
* @aashu2006 added a simplified instancing API for p5.strands. Read more here (Starting with #8878 and #8912 which was part of 2.3.1, but with most of the work shipping in 2.4 with #8952). Thanks to @davepagurek and @eupthere for your reviews on this feature!
* @perminder-17 added transformation matrix support in #8984.
* Add stateful helpers for p5.strands addons by @bhabishnu in https://github.com/processing/p5.js/pull/9309
The below sketch shows these features in the t variable (a 3D transform that includes rotation and translation), and in the instances(count).box(18) line:
<img width="157" height="158" alt="image" src="https://github.com/user-attachments/assets/81dae836-719e-4722-8689-b4ef9734dbe9" />
`js
let myShader;
let count = 10;
function setup() {
createCanvas(200, 200, WEBGL);
myShader = buildMaterialShader(placeOnRing);
}
function placeOnRing() {
worldInputs.begin();
let angle = instanceIndex TWOPI / count + millis()/1000;
let t = transform3D();
t = rotateY(t, angle);
t = translate(t, 65, 0, 0);
worldInputs.position = transformPoint(t, worldInputs.position);
worldInputs.normal = transformNormal(t, worldInputs.normal);
worldInputs.end();
}
function draw() {
orbitControl();
background('purple');
lights();
directionalLight(255, 255, 255, 0, 1, 0);
directionalLight(255, 255, 255, 0, -1, 0);
ambientLight(255, 100, 0);
noStroke();
fill('pink');
shader(myShader);
instances(count).box(18);
}
`
loadModel() in 2.4: Multi-Material Support
Compare loadModel() materials support in 2.3.4 and in 2.4.0 in this sketch:
<img width="1476" height="544" alt="Screenshot2026-10-2900-54-26" src="https://github.com/user-attachments/assets/5811f0eb-3573-4b0d-813e-154f9481cc45" />
<details>
<summary>
@Nixxx19 added support for multi-material model support. This is not an API change, but a big update in loadModel() for .obj` files with multiple materials. With thanks to @davepagurek for reviews, and @diyaayay for project mentorship.
</summary>
* GSOC 26: multi-material model parts (obj/mtl) by @Nixxx19 in https://github.com/processing/p5.js/pull/8879
* GSOC 26: render multi-material models per part by @Nixxx19 in https://github.com/processing/p5.js/pull/8955
* GSOC 26: multi-material buildGeometry by @Nixxx19 in https://github.com/processing/p5.js/pull/9063
* GSOC 26: multi-material .mtl loading test coverage by @Nixxx19 in https://github.com/processing/p5.js/pull/9065
* GSOC 26: specular, ambient, and shininess texture maps by @Nixxx19 in https://github.com/processing/p5.js/pull/9066
* GSOC 26: custom vertex attributes in multi-material buildGeometry by @Nixxx19 in https://github.com/processing/p5.js/pull/9077
* GSOC 26: normal (bump) map support by @Nixxx19 in https://github.com/processing/p5.js/pull/9067
* GSOC 26: docum
v2.4.0-rc.1预发布2026-10-20
Testers Wanted 💚
p5.js version 2.4 will be ready soon. Help testing it by trying your existing sketches with the new version, or by trying out the upcoming features! This is a release candidate (RC), which means it is not yet live on the p5.js Editor. Your help with testing now will help make the release more stable!
To help with testing, you can use this starter sketch.
Or 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.4.0-rc.1/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.4.0-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:
`js
async function setup() {
await createCanvas(400, 400, WEBGPU);
}
`
Testing this Release
A few features that are planned for 2.4 are still in progress. Check the changes below, test with existing sketches or by writing new sketches that use new functionality (like SVG, p5.strands instancing, or multi-material 3D models), and report any issues you find to help prepare this version for release.
What's New in 2.4
To help with testing, you don't need to test every single thing. It is very helpful to pick something you're familiar with in p5, and dig into it, especially looking for strange behavior in edge cases. You can pick any section or pull request below, and focus your testing on that.
Patches between 2.3 and 2.4
Starting with 2.3.2, we changed the release process. While work on the 2.4 release continued in the main branch, atomic patches made security updates and bugfixes available sooner. Want to help test? Check the release notes below and ensure everything from prior patches still works as expected.
* 2.3.1 This patch introduces new p5.strands features, improvements to shapes & SVG handling, and bugfixes across WebGL and WebGPU. It also renames the color space previously called HDR to P3 for accuracy.
* 2.3.2 This patch improves 2D paths and adds a loading animation to display when setup() takes a long time.
* 2.3.3 This patch release includes a security hardening measure, a couple of bugfixes, and documentation updates.
* 2.3.4 Bugfixes/CI, fixed TypeScript declarations generation
New in 2.4: SVG Support
* @VANSH3104 added SVG import/export in #9123. Usage and examples shown in this playlist. p5.js 2.4 will support this out of the box with no additional imports needed. With thanks to @davepagurek for reviews, and @mingness for project mentorship.
* @Danyccsf also worked on SVG-related bugfixes in #9261 and #9292
p5.strands API additions in 2.4
p5.strands is a feature in p5.js 2.x for authoring shaders using JavaScript. See: "Hello Color World" tutorial and p5.strands contribution guide. This feature in active development. New additive features added in this release:
* @aashu2006 added a simplified instancing API for p5.strands. Read more here (Starting with #8878 and #8912 which was part of 2.3.1, but with most of the work shipping in 2.4 with #8952). Thanks to @davepagurek and @eupthere for your reviews on this feature!
* @perminder-17 added transformation matrix support in #8984.
The below sketch shows these features in the t variable (a 3D transform that includes rotation and translation), and in the instances(count).box(18) line:
<img width="157" height="158" alt="image" src="https://github.com/user-attachments/assets/81dae836-719e-4722-8689-b4ef9734dbe9" />
`js
let myShader;
let count = 10;
function setup() {
createCanvas(200, 200, WEBGL);
myShader = buildMaterialShader(placeOnRing);
}
function placeOnRing() {
worldInputs.begin();
let angle = instanceIndex TWOPI / count + millis()/1000;
let t = transform3D();
t = rotateY(t, angle);
t = translate(t, 65, 0, 0);
worldInputs.position = transformPoint(t, worldInputs.position);
worldInputs.normal = transformNormal(t, worldInputs.normal);
worldInputs.end();
}
function draw() {
orbitControl();
background('purple');
lights();
directionalLight(255, 255, 255, 0, 1, 0);
directionalLight(255, 255, 255, 0, -1, 0);
ambientLight(255, 100, 0);
noStroke();
fill('pink');
shader(myShader);
instances(count).box(18);
}
`
loadModel() in 2.4: Multi-Material Support
<details>
<summary>
@Nixxx19 added support for multi-material model support. This is not an API change, but a big update in loadModel() for .obj files with multiple materials. With thanks to @davepagurek for reviews, and @diyaayay for project mentorship.
</summary>
* GSOC 26: multi-material model parts (obj/mtl) by @Nixxx19 in https://github.com/processing/p5.js/pull/8879
* GSOC 26: render multi-material models per part by @Nixxx19 in https://github.com/processing/p5.js/pull/8955
* GSOC 26: multi-material buildGeometry by @Nixxx19 in https://github.com/processing/p5.js/pull/9063
* GSOC 26: multi-material .mtl loading test coverage by @Nixxx19 in https://github.com/processing/p5.js/pull/9065
* GSOC 26: specular, ambient, and shininess texture maps by @Nixxx19 in https://github.com/processing/p5.js/pull/9066
* GSOC 26: custom vertex attributes in multi-material buildGeometry by @Nixxx19 in https://github.com/processing/p5.js/pull/9077
* GSOC 26: normal (bump) map support by @Nixxx19 in https://github.com/processing/p5.js/pull/9067
* GSOC 26: document multi-material and texture map support by @Nixxx19 in https://github.com/processing/p5.js/pull/9068
* GSOC 26: bumpTexture() for height maps by @Nixxx19 in https://github.com/processing/p5.js/pull/9089
* GSOC 26: keep bump map slopes correct at image edges by @Nixxx19 in https://github.com/processing/p5.js/pull/9095
* GSOC 26: multi-material audit, edge cases, and a windows path fix by @Nixxx19 in https://github.com/processing/p5.js/pull/9096
* GSOC 26: apply mtl material state to single-material models by @Nixxx19 in https://github.com/processing/p5.js/pull/9110
* Fix loadModel normalize overload validation by @xsupremeyx in https://github.com/processing/p5.js/pull/9286
</details>
Significant updates to Friendly Error System (FES) in 2.4
In #9212, @limzykenneth continued the FES rework started in #8887. The FES has been modularized and now supports translation. Finally, in #9307, @limzykenneth improved performance of FES, so it can be used for longer even as sketches get more complex.
Translations can be loaded in two ways, from a local file or from CDN. Within the same folder, the p5.js script will look for ${languageCode}.json` for a file matching that name and load it as a translation string JSON, if that file cannot be found, it will then load from the JSDelivr CDN for a version we publish. If that also does not exist, no translation will be loaded and messages will be printed in the language it is written, ie. English.
In #9109, @davepagurek added experimental feature logging, which users will notice when they use SVG and p5.strands API in this release. Thanks to @Vaivaswat2244 for reviewing!
<details>
<summary>Additional FES bugfixes and documentation improvements were added by @harshiltewari2004, @bhabishnu, @aashu2006, and @
v2.3.42026-09-26
<!-- Release notes generated using configuration in .github/release.yml at v2.3.4 -->
This patch release includes a couple of bugfixes. Use this version by including:
``html
<script src="https://cdn.jsdelivr.net/npm/p5@2.3.4/lib/p5.js"></script>
<!-- Optional for WEBGPU renderer: -->
<script src="https://cdn.jsdelivr.net/npm/p5@2.3.4/lib/p5.webgpu.js"></script>
`
What's Changed
* In https://github.com/processing/p5.js/issues/9202 several contributors @haukun @Vaivaswat2244 and @scs0209 investigated a problem with p5.VERSION. This was the result of a problem during the previous patch release, and the problem is fixed in 2.3.4
* In https://github.com/processing/p5.js/pull/9211 @davepagurek fixed a bug that prevented a more helpful FES message when preload() was used.
* In https://github.com/processing/p5.js/pull/9215 @limzykenneth enabled CI for the stable branch to improve the new release process.
* @Pranava-Pai-N reported and fixed https://github.com/processing/p5.js/issues/9141, with review by @limzykenneth and @perminder-17
* @Pcmhacker-piro fixed the missing types declarations issue https://github.com/processing/p5.js/issues/9190 reported by @m4lt3
Work continues (in the main` branch) toward 2.4, but this atomic patch makes bugfixes available sooner, following our recent approach to patch releases.
Full Changelog: https://github.com/processing/p5.js/compare/v2.3.3...v2.3.4
v2.3.32026-09-08
<!-- Release notes generated using configuration in .github/release.yml at v2.3.3 -->
This patch release includes a security hardening measure, a couple of bugfixes, and documentation updates.
Use this version by including:
``html
<script src="https://cdn.jsdelivr.net/npm/p5@2.3.3/lib/p5.js"></script>
<!-- Optional for WEBGPU renderer: -->
<script src="https://cdn.jsdelivr.net/npm/p5@2.3.3/lib/p5.webgpu.js"></script>
`
In https://github.com/processing/p5.js/pull/9145 @limzykenneth introduces MAXGIFPIXELS, a static property that defines how large, in total pixels, a GIF image is allowed to be loaded into a p5 sketch. The default value is 16,000,000. This means an image's width multiplied by its height must not exceed that value. The property can be set higher if needed. This limitation prevents a GIF with a very large canvas from taking up a lot of browser memory ("decompression bomb"). This patch addresses a security vulnerability report by @slash-init, thanks for reporting! Security vulnerabilities can be reported according to the SECURITY.md policy.
In https://github.com/processing/p5.js/issues/9006 @roymacdonald spotted and patched a typo in quaternion multiplication, adding tests as well. In https://github.com/processing/p5.js/issues/9039 @xdroberto fixed a Friendly Error System (FES) parameter validation bug that @TakagiHitoshi spotted.
Finally, in https://github.com/processing/p5.js/pull/9118 @ksen0 added initial documentation of p5's new Decorators API. This API is mainly aimed at addon authors, but is also used throughout the p5.js library code. In programming, a decorator helps to reduce duplicated code. In p5.js, decorators are applied using p5.registerDecoration(pattern, decorator). They have been supported since version 2.3.0, and follow the TC39 proposal as closely as possible. The new contributor guide is for p5.js code contributors who would like to learn when to use a decorator, and how.
Work continues (in the main` branch) toward 2.4, but this atomic patch makes recent security updates and bugfixes available sooner, following our recent approach to patch releases.
🎉 Thanks to all contributors & stewards!
Full Changelog: https://github.com/processing/p5.js/compare/v2.3.2...v2.3.3
v2.3.2 Patch: Path performance & loading animation2026-07-31
<!-- Release notes generated using configuration in .github/release.yml at v2.3.2 -->
This patch improves 2D paths and adds a loading animation to display when setup() takes a long time.
@okra-sf reported how using beginShape/endShape with many vertex calls created slowdowns in v2 compared to v1. Work in https://github.com/processing/p5.js/pull/9025 on speeding up how paths are drawn included extensive benchmarking, and was reviewed by @davepagurek @VANSH3104 and @treerao
The loading animation was added in https://github.com/processing/p5.js/pull/8997 by @Jextic and @gojoshin as part of the CodeDay program, and reviewed by @limzykenneth and @ksen0
🎉 Thanks to all contributors & stewards!
Full Changelog: https://github.com/processing/p5.js/compare/v2.3.1...v2.3.2