What's Changed 🎊
WebGL
In this release, p5.js added some new WebGL mode tools. Filters now run in shaders for extra speed, and you can now run custom filter shaders, even on 2D canvases. You can now cut holes in shapes with beginContour()
and apply vector masks with beginClip()
. You can reuse shapes more efficiently with buildGeometry()
and instanced rendering. Finally, we have also fixed a number of bugs. - Summary written by @davepagurek ✨
- Add support for beginContour() and endContour() in Webgl mode by @davepagurek in #6297
- Fix stroke rendering when drawing to framebuffers by @davepagurek in #6304
- Adds createFilterShader() and custom shader support to the webGL filter() function by @wong-justin in #6237
- Fix WebGL text not rendering when rotated 90 degrees by @davepagurek in #6316
- Fix reading between nested active framebuffers by @davepagurek in #6314
- Add methods to construct p5.Geometry from other p5 drawing functions by @davepagurek in #6287
- Handle missing exact edge vertices in buildGeometry by @davepagurek in #6320
- Fix strokes on framebuffers with different aspect ratios by @davepagurek in #6339
- Fix freed geometry leaving attributes in a broken state by @davepagurek in #6323
- Improve performance of line rendering by @davepagurek in #6230
- Add support for webGL instancing by @RandomGamingDev in #6276
- Add shaders for filter() constants, and use them by default in P2D by @wong-justin in #6324
- Fix clip() on both the main canvas and framebuffers by @davepagurek in #6376
- fixed texture filtering bug in p5.Framebuffer by @KeyboardSounds in #6420
- Fix clear() on framebuffers on Intel macs by @davepagurek in #6429
- Fix textureMode(IMAGE) + beginShape(TESS) by @davepagurek in #6366
- fixed issue #6440 by @Gaurav-1306 in #6446
- Erode, dilate, threshold shader filters match closer to CPU filters by @wong-justin in #6405
- Update WebGL blur filter to match CPU blur more by @davepagurek in #6460
- Fix camera flipping on framebuffers between push/pop calls by @davepagurek in #6471
- Setuniform by @Gaurav-1306 in #6474
- resolved issue #6399 by @Gaurav-1306 in #6480
- Auto-bind filter shaders to the filter graphic by @davepagurek in #6482
- new PR for issue #6383(Problem for diagonal) by @perminder-17 in #6488
Friendly Error System (FES)
- Add Hindi translation to FES by @Ayush23Dash in #6272
- Re-worded lines 413 and 446 of FES Developer Notes by @OnexiMedina in #6307
- Reference FES Contributor Docs inside FES Directory along with a diagram to understand usages of FES functions by @Ayush23Dash in #6335
- Fixed typing errors in fes_core.js documentation by @Garima3110 in #6478
- Update friendly_error_system.md by @Garima3110 in #6481
- Update fes_reference_dev_notes.md by @Garima3110 in #6486
Reference Documentation Update
We updated a group of p5.js Reference pages as part of 2023 Season of Docs (SoD) program, with a goal to make them more accessible and beginner-friendly. Thanks to the SoD technical writer @nickmcintyre ✨.
- Edit docs for math functions by @nickmcintyre in #6281
- docs(typography): fix typos in example for textFont by @meezwhite in #6401
- Edit docs for p5.Vector by @nickmcintyre in #6340
- Edit docs for pixels functions by @nickmcintyre in #6390
- Edit docs for loading & displaying images by @nickmcintyre in #6425
- Update docs for p5.Image by @nickmcintyre in #6434
- Edit docs for p5.Font by @nickmcintyre in #6453
- Edit docs for image by @nickmcintyre in #6424
- Edit docs for typography load and display by @nickmcintyre in #6450
Google Summer of Code (GSoC) 2023 Wrap up
- 🌸 Added GSoC wrap up! by @dewanshDT in #6403
- Gsoc 23 Wrapup post by @Ayush23Dash in #6415
- add GSoC'23 wrapup post for Justin Wong by @wong-justin in #6418
- Create lichlyter_gsoc_2023.md by @katlich112358 in #6455
- Create munusshih_gsoc_2023.md by @munusshih in #6461
Other Code Update
- Ask to disable printing when print() called with no arguments by @davepagurek in #6253
- fix textWidth() and textToPoints() by @munusshih in #6184
- Fix issue where nf with 0 'right' parameter returns undefined in string by @limzykenneth in #6291
- Update environment.js with fix for frameRate description by @quinton-ashley in #6269
- Implement clip() to shapes by @davepagurek in #6306
- Clarified workflow for contributing documentation by @thatguyseven in #6312
- Clears MediaElement canvas at the beginning of every frame by @donaldzhu in #6309
- Clean up gruntfile release related steps by @Qianqianye in #6321
- fix-return-type by @asukaminato0721 in #6326
- fix HALF_FLOAT by @asukaminato0721 in #6330
- Added .gitattributes to Increase compatability with Window users and line endings by @SilasVM in #6317
- update all contributors setup by @gr2m in #6341
- refine canvas' type by @asukaminato0721 in #6328
- MouseEvent, WheelEvent and KeyboardEvent type by @asukaminato0721 in #6329
- fixed-wrong-capture-size-and-freeze-issue by @Prateek93a in #5159
- add more event type by @asukaminato0721 in #6379
- Main by @j-adel in #6374
- Update labeler Github Action by @stampyzfanz in #6395
- add unregisterMethod function by @capGoblin in #6426
- add before/after preload and setup by @capGoblin in #6433
- Fix: Misleading error message when NaN passed by @capGoblin in #6464
- Support pixel density on p5.Image (fixes issue #6114) by @Gaurav-1306 in #6447
- Fix orphan canvas when sketch is removed before canvas creation by @limzykenneth in #6355
Other Documentation Update
- Fixed GitHub capitalization typo in contributor_docs by @SilasVM in #6284
- Fixing typo in "What are issues?" by @snwarner22 in #6288
- Fixed GitHub spelling in CONTRIBUTING.md by @SilasVM in #6295
- Fixed grammatical errors in contributor_guidelines.md by @thatguyseven in #6296
- Update documentation_style_guide.md with new guideline by @zelf0 in #6334
- add missing code contributors to all contributors in README and
.all-contributors.rc
file by @gr2m in #6349 - docs(all-contributors): remove @stellartux as requested by @gr2m in #6368
- docs(src/utilities): Use
describe()
instead of@alt
by @Zearin in #5598 - Fix typo in export path to fix dev mode by @mykongee in #6373
- Improve Readme for future Contributors to codebase by @Ayush23Dash in #6260
- Fixed mousePressed() Example Error by @Utkarsh3128 in #6413
- Update README.md by @katlich112358 in #6458
- Fixed typing errors in validate_params.js file's documentation by @Garima3110 in #6473
- typo and unused variable from core by @benschac in #6476
New Contributors 💗
- @munusshih made their first contribution in #6184
- @SilasVM made their first contribution in #6284
- @snwarner22 made their first contribution in #6288
- @thatguyseven made their first contribution in #6296
- @OnexiMedina made their first contribution in #6307
- @donaldzhu made their first contribution in #6309
- @gr2m made their first contribution in #6341
- @RandomGamingDev made their first contribution in #6276
- @mykongee made their first contribution in #6373
- @j-adel made their first contribution in #6374
- @meezwhite made their first contribution in #6401
- @dewanshDT made their first contribution in #6403
- @Utkarsh3128 made their first contribution in #6413
- @KeyboardSounds made their first contribution in #6420
- @capGoblin made their first contribution in #6426
- @Gaurav-1306 made their first contribution in #6446
- @katlich112358 made their first contribution in #6455
- @Garima3110 made their first contribution in #6473
- @benschac made their first contribution in #6476
- @perminder-17 made their first contribution in #6488
- @lakshay451 made their first contribution in #6493
Full Changelog: v1.7.0...v1.8.0