Skip to content

Update dependency p5 to v2 - #236

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/p5-2.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/p5-2.x

Conversation

@renovate

@renovate renovate Bot commented Mar 15, 2026 •

Copy link
Copy Markdown
Contributor

Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
p5 (source) ^1.11.3 → ^2.0.0 age adoption passing confidence

Release Notes

processing/p5.js (p5)

v2.4.0

Compare Source

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!

A galaxy of purple stars with the label p5.js 2.4

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:

<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:

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
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:

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():

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:

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:

image
let myShader;
let count = 10;

function setup() {
  createCanvas(200, 200, WEBGL);
  myShader = buildMaterialShader(placeOnRing);
}

function placeOnRing() {
  worldInputs.begin();
  let angle = instanceIndex * TWO_PI / 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:

Screenshot_2026-10-29_00-54-26

@​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.

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!

Additional FES bugfixes and documentation improvements were added by @​limzykenneth, @​harshiltewari2004, @​bhabishnu, @​aashu2006, and @​sneakyfelix
Vectors and Math
In continued stabilization, vector and math operations now behave consistently across dimensions. These contributions by @​mawerb @​BHARATH0153 @​Pranava-Pai-N @​Pcmhacker-piro @​dontwanttothink Ayush4958 were reviewed by @​davepagurek and @​perminder-17 - thank you!
Security and Testing

This minor release includes substantial work on updating dependencies and build system, as well as automated tests including performance test. Additionally, based on feedback from Processing Foundation team, current p5.js maintainers, and active p5.js editor contributors, we have now created and published an updated Security Policy that includes a public incident response plan. Thanks to @​perminder-17 for stewarding this update in #​9298

Build, dependency, and CI updates by @​limzykenneth @​ulgens @​Vaivaswat2244 @​AmanUllah687
Automated testing improvements by @​harshiltewari2004 @​BhumitSahani @​shakeelmohamed @​michtesar, @​yashgoyal0110 @​Danyccsf @​Pranava-Pai-N and @​Shruti2110-coder @​LalitNarayanYadav
Graphics Improvements and Bugfixes
p5.strands API & Transpiler by @​eupthere @​davepagurek @​tsumon @​harshiltewari2004 @​LalitNarayanYadav @​bhabishnu @​aashu2006 @​Akshats-git
Rendering & Shading by @​Vaivaswat2244 @​Srinidhi444 @​bhabishnu @​skyyash @​harshiltewari2004
Core & Performance by @​frank890417 @​NalinDalal @​dontwanttothink, with thanks to @​davepagurek @​limzykenneth @​perminder-17 for reviews
Tools for Writing Accessible sketches

The next release focuses on expanding this quite of tools, but support for multilingual support in screen readers has been added in #​9116 by @​Jextic with stewardship and guidance by @​perminder-17

Documentation and Bugfixes
Stability improvements and bugfixes by @​limzykenneth @​harshiltewari2004 @​slash-init @​Pcmhacker-piro @​skyyash
Documentation improvements by @​aashishpanthi @​skyyash @​MarsGray @​Goutte @​TheNetherWatcher @​ksen0 @​Ayush4958 @​BhumitSahani @​vamshi567bh @​j-xsen

p5.js Library is a Community Effort

Stewards & Mentors

Every PR is reviewed by at least one maintainer or steward, most of whom are volunteers. The work in this release was supported by thoughtful comments, reviews, discussions, and mentorship by @​davepagurek @​diyaayay @​eupthere @​ksen0 @​limzykenneth @​mingness @​perminder-17 @​skyyash @​Vaivaswat2244. Additional special thanks to @​aashu2006 @​Ayush4958 @​bhabishnu and @​lirenjie95 for your support with reviews!

Welcome to first-time contributors! 🎉

Full Changelog: processing/p5.js@v2.3.0...v2.4.0

v2.3.4

Compare Source

This patch release includes a couple of bugfixes. Use this version by including:

<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

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: processing/p5.js@v2.3.3...v2.3.4

v2.3.3

Compare Source

This patch release includes a security hardening measure, a couple of bugfixes, and documentation updates.
Use this version by including:

<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 #​9145 @​limzykenneth introduces MAX_GIF_PIXELS, 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 #​9006 @​roymacdonald spotted and patched a typo in quaternion multiplication, adding tests as well. In #​9039 @​xdroberto fixed a Friendly Error System (FES) parameter validation bug that @​TakagiHitoshi spotted.

Finally, in #​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: processing/p5.js@v2.3.2...v2.3.3

v2.3.2: Patch: Path performance & loading animation

Compare Source

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 #​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 #​8997 by @​Jextic and @​gojoshin as part of the CodeDay program, and reviewed by @​limzykenneth and @​ksen0

🎉 Thanks to all contributors & stewards!

Full Changelog: processing/p5.js@v2.3.1...v2.3.2

v2.3.1

Compare Source

2.3.1 Hex codes in shaders and continued p5.strands development; tint() and other fixes; HDR renamed to P3

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.

  • Fixes for loading SVG files and bad URLs with loadImage(), applying tint() to images in 2D mode, framebuffers with custom pixel densities, orbitControl() after swiping outside the canvas, mouseIsPressed behavior after clicking DOM elements, and line(), point(), triangle(), quad(), rect() (including with rounded corners, like in the example below)
  • In shaders and p5.strands code, this patch adds randomGaussian() and color() support inside p5.strands shader code, instanceIndex for instanced rendering, TRIANGLE_FAN drawing in both WebGL and WebGPU, custom shaders that set uSampler via setUniform(), hooks that return objects should work, custom shaders should be able to use version directives, and mouseX and width in instance mode with p5.strands shaders

[!WARNING]
This release renames the color space previously called HDR to P3 for accuracy. If you use HDR color space constants in your code, please update them to P3. The maintainers felt this correction was important to make now. If you have concerns about backward compatibility, you can share them on the linked pull request discussion.

You can start using this updated version in 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.3.1/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.3.1/lib/p5.webgpu.js"></script>

To use WebGPU mode in createCanvas note the async/await, which is needed for WebGPU but not WebGL:

async function setup() {
  await createCanvas(400, 400, WEBGPU);
}

What's new in p5.strands

randomGaussian() is available in p5.strands code - see the static example in the starter sketch or below, which also shows more p5.js-style, beginner-friendly colors.

[!IMPORTANT]
✂ PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Mar 15, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
just-be-dev 0c608b5 Nov 15 2026, 02:28 AM

@renovate
renovate Bot force-pushed the renovate/p5-2.x branch 2 times, most recently from 3498678 to f2d558c Compare March 18, 2026 09:34
@renovate
renovate Bot force-pushed the renovate/p5-2.x branch 3 times, most recently from 8316422 to 6496081 Compare March 30, 2026 14:35
@renovate
renovate Bot force-pushed the renovate/p5-2.x branch from 6496081 to 9a3070f Compare April 8, 2026 18:15
@renovate
renovate Bot force-pushed the renovate/p5-2.x branch 2 times, most recently from 7c96cd1 to b4c4fe2 Compare May 10, 2026 14:58
@renovate
renovate Bot force-pushed the renovate/p5-2.x branch from b4c4fe2 to c49972b Compare May 18, 2026 11:11
@renovate
renovate Bot force-pushed the renovate/p5-2.x branch from c49972b to 57f6403 Compare May 31, 2026 17:44
@renovate
renovate Bot force-pushed the renovate/p5-2.x branch from 57f6403 to 6e844e6 Compare June 16, 2026 03:00
@renovate
renovate Bot force-pushed the renovate/p5-2.x branch 4 times, most recently from bab6ff1 to da97503 Compare July 13, 2026 09:29
@renovate
renovate Bot force-pushed the renovate/p5-2.x branch 2 times, most recently from 2f45175 to bab5ef5 Compare July 24, 2026 19:48
@renovate
renovate Bot force-pushed the renovate/p5-2.x branch from bab5ef5 to 86b8801 Compare August 2, 2026 21:49
@renovate
renovate Bot force-pushed the renovate/p5-2.x branch from 86b8801 to 6396225 Compare August 15, 2026 00:56
@renovate
renovate Bot force-pushed the renovate/p5-2.x branch 2 times, most recently from b5b3c4d to e7fd1a8 Compare September 10, 2026 22:05
@renovate
renovate Bot force-pushed the renovate/p5-2.x branch 2 times, most recently from 62c9353 to 111ce19 Compare October 5, 2026 17:08
@renovate
renovate Bot force-pushed the renovate/p5-2.x branch from 111ce19 to b559fc0 Compare October 20, 2026 11:55
@renovate renovate Bot changed the title fix(deps): update dependency p5 to v2 Update dependency p5 to v2 Oct 20, 2026
@renovate
renovate Bot force-pushed the renovate/p5-2.x branch from b559fc0 to c7b5dd3 Compare October 22, 2026 09:11
@renovate
renovate Bot force-pushed the renovate/p5-2.x branch from c7b5dd3 to 2d9356e Compare November 5, 2026 20:58
@renovate
renovate Bot force-pushed the renovate/p5-2.x branch from 2d9356e to 0c608b5 Compare November 15, 2026 02:27

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants