New py5 Release: 0.10.8a4
One final release before the year's end! The py5 version 0.10.8a4 is now live.
New Features
While at Python Brasil I taught a tutorial on 2D and 3D geometries with py5 with Alexandre Villares. While preparing for this tutorial I developed prototypes of new features for py5's Python Ecosystem Integrations with Trimesh and matplotlib. These features are now included in this release.
Trimesh Primitives
The new Trimesh feature is an improvement to how primitives are converted to Py5Shape objects. Previously every triangle in the mesh would have the edge lines drawn, much like how Processing renders 3D meshes. Now, when converting a Trimesh object to a Py5Shape object, the default will be to only draw the facet edges of the mesh. This results in a much cleaner look for 3D models that are intended to be rendered as wireframes. See the Trimesh integration documentation for details.
Matplotlib TextPath
The new matplotlib feature is a new supported object type for conversion to Py5Shape objects: TextPath. This allows you to leverage matplotlib's text rendering capabilities, including support for equations and LaTeX typography. See the matplotlib integration documentation for more information.
Version Updates
This py5 release includes the core jars from the latest Processing release, 4.4.10.
Bug Fixes and Small Improvements
There were also some bug fixes in this release:
One of the newer releases of Processing (4.4.10?) changed the default pixel density on high density displays to 2 but would issue a warning to notify you of the change. The warning perhaps is reasonable for PDE users but is super annoying when using py5 in a terminal or a Jupyter notebook. In py5, the warning will no longer appear.
#711 - The 2X scaling problem for the
%%py5drawJupyter magic on OSX has been fixedThe println() method now has a
flushparameter that works like theflushparameter in Python's built-inprint()function. When set toTrue, the output buffer is flushed immediately. This is useful when your print stream is writing to a file (enable this with the set_print_stream() method).Users with Java 24 or 25 installed experience a weird warning message about enabling native access. Processing has the same issue - this is because of JVM changes in Java 24. This version of py5 enables native access so the warning message won't appear anymore. In addition, the JavaFX renderer needed an additional fix to avoid a similar warning message. However, note that right now py5 plus JavaFX seems to have some other strange and fatal problem on my Linux machine when using Java 25. If use JavaFX and Java 25, please let me know either way if it works for you.
There were also some small improvements to the documentation, particularly the documentation about color
Sponsor py5coding on GitHub
Like py5? Want to help support further py5 development? Consider sponsoring py5 on GitHub.
I started working on py5 almost six years ago when the pandemic lockdown started as a way to manage my anxiety about the situation. Since then, py5 has grown into a full-featured tool for creative coding that is used all around the world. I'm grateful for the support of everyone I've met who helped py5 grow into the useful library that it is today. I love working on this, but it does take a lot of time and is very much like a part time job for me.
I'm not going to pressure anyone into becoming a sponsor and I do ask that if you are struggling financially for any reason that you don't sponsor py5. But if you are able to sponsor py5, please consider doing so. Your sponsorship will help me continue to work on py5 and make it a better tool for everyone to use!
And if you don't want to sponsor py5, that's totally fine too. How about a GitHub star instead? The py5 and py5generator repositories could use a star from you!
What's Ahead
I'm on vacation to New Zealand for most of January. During this time I will be mostly offline and not working on py5. I'll take lots of photos and return refreshed and ready to continue working on py5 in February.
Happy coding!
Comments