github processing/p5.js v2.3.1-rc.1

pre-release4 hours ago

What's Changed

Testers Wanted 💚

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

<script src="https://cdn.jsdelivr.net/npm/p5@2.3.1-rc.1/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.3.1-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);
}

What's new

random() is available in p5.strands code - see the "static cube" example in the starter sketch or below!

More p5.js-style, beginner-friendly colors are also available, as well as initial work for a more p5.js-style instancing API. Besides testing these additions, we welcome suggestions for how to best demonstrate them in the starter sketch for the upcoming patch!

Related pulls:

image
// This sketch uses an unreleased version of p5.js
// github.com/processing/p5.js/releases/tag/v2.3.1-rc.1
// Thanks for testing 💚 

function setup() {
  createCanvas(400, 400, WEBGL);
  myShader = buildMaterialShader(myShaderBuilder);
}

function myShaderBuilder(){
  finalColor.begin();
  let coord = finalColor.texCoord;
  finalColor.set(random(0.8));
  finalColor.end();
}

function draw() {
  stroke(255);
  background("#f1678e");
  shader(myShader);
  orbitControl();
  box(100);
}

Custom shader bugfixes

Ongoing work on shapes & SVG

  • fix : other shape use the shape class also add new roundrect Primitive by @VANSH3104 in #8899
  • Fix loadImage SVG file loading regression by @gfrancine in #8937

Other bugfixes

What's Changed 🎊

New Contributors

Full Changelog: v2.3.0...v2.3.1-rc.1

Don't miss a new p5.js release

NewReleases is sending notifications on new releases.