gestalten-in-code icon indicating copy to clipboard operation
gestalten-in-code copied to clipboard

fix(deps): update dependency p5 to v2

Open renovate[bot] opened this issue 7 months ago • 2 comments
trafficstars

This PR contains the following updates:

Package Change Age Confidence
p5 (source) ^0.4.22 -> ^2.0.0 age confidence

Release Notes

processing/p5.js (p5)

v2.1.1

Compare Source

Use this link to load the library: https://cdn.jsdelivr.net/npm/p5@​2.1.1/lib/p5.js

What's new in p5.js 2.1 🌱
   let bgColor, fg1Color, fg2Color, msg1, msg2;
   function setup() {
     createCanvas(100, 100);
     bgColor = color(0);
     fg1Color = color(100);
     fg2Color = color(220);
  
     if(bgColor.contrast(fg1Color)){
       msg1 = 'good';
     }else{
       msg1 = 'bad';
     }
  
     if(bgColor.contrast(fg2Color)){
       msg2 = 'good';
     }else{
       msg2 = 'bad';
     }
  
     describe('A black canvas with a faint grey word saying "bad" at the top left and a brighter light grey word saying "good" in the middle of the canvas.');
   }
  
   function draw(){
     background(bgColor);
  
     textSize(18);
  
     fill(fg1Color);
     text(msg1, 10, 30);
  
     fill(fg2Color);
     text(msg2, 10, 60);
   }

oneColor.contrast(anotherColor) checks the contrast between two colors. This method returns a boolean value to indicate if the two color has enough contrast. true means that the colors has enough contrast to be used as background color and body text color. false means there is not enough contrast.

A second argument can be passed to the method, options , which defines the algorithm to be used. The algorithms currently supported are WCAG 2.1 ('WCAG21') or APCA ('APCA'). The default is WCAG 2.1. If a value of 'all' is passed to the options argument, an object containing more details is returned. The details object will include the calculated contrast value of the colors and different passing criteria.

   let bgColor, fgColor, contrast;
   function setup() {
     createCanvas(100, 100);
     bgColor = color(0);
     fgColor = color(200);
     contrast = bgColor.contrast(fgColor, 'all');
  
     describe('A black canvas with four short lines of grey text that respectively says: "WCAG 2.1", "12.55", "APCA", and "-73.30".');
   }
  
   function draw(){
     background(bgColor);
  
     textSize(14);
  
     fill(fgColor);
     text('WCAG 2.1', 10, 25);
     text(nf(contrast.WCAG21.value, 0, 2), 10, 40);
  
     text('APCA', 10, 70);
     text(nf(contrast.APCA.value, 0, 2), 10, 85);
   }

For more details about color contrast, you can check out this page from color.js, and the WebAIM color contrast checker.

Changes since 2.0 🎊

New Contributors

Full Changelog: https://github.com/processing/p5.js/compare/v2.0.0...v2.1.1

v2.1.0

Compare Source

Use this link to load the library: https://cdn.jsdelivr.net/npm/p5@​2.1.0/lib/p5.js

What's new in p5.js 2.1 🌱
   let bgColor, fg1Color, fg2Color, msg1, msg2;
   function setup() {
     createCanvas(100, 100);
     bgColor = color(0);
     fg1Color = color(100);
     fg2Color = color(220);
  
     if(bgColor.contrast(fg1Color)){
       msg1 = 'good';
     }else{
       msg1 = 'bad';
     }
  
     if(bgColor.contrast(fg2Color)){
       msg2 = 'good';
     }else{
       msg2 = 'bad';
     }
  
     describe('A black canvas with a faint grey word saying "bad" at the top left and a brighter light grey word saying "good" in the middle of the canvas.');
   }
  
   function draw(){
     background(bgColor);
  
     textSize(18);
  
     fill(fg1Color);
     text(msg1, 10, 30);
  
     fill(fg2Color);
     text(msg2, 10, 60);
   }

oneColor.contrast(anotherColor) checks the contrast between two colors. This method returns a boolean value to indicate if the two color has enough contrast. true means that the colors has enough contrast to be used as background color and body text color. false means there is not enough contrast.

A second argument can be passed to the method, options , which defines the algorithm to be used. The algorithms currently supported are WCAG 2.1 ('WCAG21') or APCA ('APCA'). The default is WCAG 2.1. If a value of 'all' is passed to the options argument, an object containing more details is returned. The details object will include the calculated contrast value of the colors and different passing criteria.

   let bgColor, fgColor, contrast;
   function setup() {
     createCanvas(100, 100);
     bgColor = color(0);
     fgColor = color(200);
     contrast = bgColor.contrast(fgColor, 'all');
  
     describe('A black canvas with four short lines of grey text that respectively says: "WCAG 2.1", "12.55", "APCA", and "-73.30".');
   }
  
   function draw(){
     background(bgColor);
  
     textSize(14);
  
     fill(fgColor);
     text('WCAG 2.1', 10, 25);
     text(nf(contrast.WCAG21.value, 0, 2), 10, 40);
  
     text('APCA', 10, 70);
     text(nf(contrast.APCA.value, 0, 2), 10, 85);
   }

For more details about color contrast, you can check out this page from color.js, and the WebAIM color contrast checker.

Changes since 2.0 🎊

New Contributors

Full Changelog: https://github.com/processing/p5.js/compare/v2.0.0...v2.1.0

v2.0.5

Compare Source

What's Changed

This patch fixes a regression on noise(), and adds many improvements in the documentation of splines and curves. Use this release: https://cdn.jsdelivr.net/npm/p5@​2.0.5/lib/p5.min.js

What's Changed 🎊

New Contributors

Full Changelog: https://github.com/processing/p5.js/compare/v2.0.4...v2.0.5

v2.0.4

Compare Source

What's Changed 🎊

p5.strands Improvements 🧵

p5.strands is an experimental new feature in in p5.js 2.0 for authoring shaders with JavaScript. You can check out the tutorials if you're interested in trying it out. If you're interested in diving deeper and contributing, you're welcome to join the discussion in the the #p5strands channel on our Discord, or work on the open p5.strands issues

Bug Fixes 🐞
Documentation 📚
  • Remove incorrect mouseX/mouseY docs regarding WEBGL mode in dev-2.0 branch. by @​perminder-17 in #​8006
  • Update dev-2.0 docs with recen

Configuration

📅 Schedule: 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.

renovate[bot] avatar Apr 17 '25 17:04 renovate[bot]

Deploy Preview for gestalten-in-code ready!

Name Link
Latest commit d1ca5ba5400d026335f8e9a271c3a71bcba4653c
Latest deploy log https://app.netlify.com/sites/gestalten-in-code/deploys/68014166bf5500000815fd5b
Deploy Preview https://deploy-preview-79--gestalten-in-code.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Apr 17 '25 17:04 netlify[bot]

Deploying gestalten-in-code with  Cloudflare Pages  Cloudflare Pages

Latest commit: d1ca5ba
Status:🚫  Build failed.

View logs