What's Changed
This patch includes documentation, bugfixes, and dependency updates. A flatter p5.strands API is also included as part of ongoing incremental strands API.
You can get started with the features in this release using these sketches:
- p5 2.2.1 starter/demo with p5.strands buildFilterShader - demonstrates a filter shader using p5.strands
- p5 2.2.1 starter with WEBGPU - the WebGPU mode is new in 2.2, and released experimentally for community testing
The focus of this patch is performance improvements to WebGPU core add-on. 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.1/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.1/lib/p5.webgpu.js"></script>Then load WebGPU mode in createCanvas:
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 rotation transformations outside of push/pop applying to main canvas in WebGPU by @davepagurek in #8423
- Make sure getTexture works in vertex shaders by @davepagurek in #8424
- Performance improvements for colors by @davepagurek in #8355
- fix textToModel regression for space characters by @skyash-dev in #8429
- add unit tests for HSB color space by @Piyushrathoree in #8376
- Experiment: flatter strands API by @davepagurek in #8314
- Auto return shader hooks by @vietnguyen2358 in #8384
- Fix
noiseDetail()in p5.js 2.x so that thefalloffparameter defaults to0.5when omitted. by @shuklaaryan367-byte in #8417 - Normalize strands noise output range to match JS noise() by @rakesh2OO5 in #8430
- fix createColorPicker ignores initial colour arg on chrome by @Piyushrathoree in #8363
- Add WebGL visual regression tests for transform functions by @aashu2006 in #8465
- Fix gifs in WebGL mode by @davepagurek in #8472
- feat(webgl): add global property support for p5.strands by @avinxshKD in #8211
- Webgpu perf updates by @davepagurek in #8480
- docs(p5.strands): document smoothstep by @jjnawaaz in #8459
- gitignore vscode local.code-workspace allowing users project-specific overrides by @nbogie in #8479
- fix(webgl): normalize nearly identical vertices before tessellation by @avinxshKD in #8221
- Remove deprecated, unmaintained vscode extension "npm" from recommendations by @nbogie in #8497
- Use --shallow in doc build to prevent documentation.js from processing GLSL imports by @nbogie in #8500
- Dependencies updates by @limzykenneth in #8360
- Add visual regression tests for WebGL 3D primitives by @aashu2006 in #8485
- Add transform support to bezier shapes in clip() by @VANSH3104 in #8481
- Fix instance mode usage of uniformFloat() in shader.modify() example by @aashu2006 in #8470
- More performance updates for WebGPU mode by @davepagurek in #8502
- More WebGPU optimizations by @davepagurek in #8510
- fix: use
@chainableper-overload by @LuLaValva in #8504 - add getTexture docs and examples for p5.strands by @nbogie in #8446
New Contributors
- @vietnguyen2358 made their first contribution in #8384
- @shuklaaryan367-byte made their first contribution in #8417
- @rakesh2OO5 made their first contribution in #8430
- @aashu2006 made their first contribution in #8465
- @jjnawaaz made their first contribution in #8459
- @LuLaValva made their first contribution in #8504
Stewards
This patch was stewarded (through code review, comments, and discussion) by
@davepagurek
@limzykenneth
@nbogie
@perminder-17
@ksen0
Full Changelog: v2.2.0...v2.2.1