Skip to content

Processing Mode and Hybrid Coding

Pre-release
Pre-release

Choose a tag to compare

@hx2A hx2A released this 04 May 11:55
· 946 commits to main since this release
08749e4

This is a major release with big improvements to py5's functionality. This release was a lot of work!

What Changed?

You can read about all of the changes and the reasons behind them on the maintainers blog. The main highlights are:

  • Processing Mode - gives Processing users a new callPython() method to make arbitrary calls to Python. Here, py5 functions as a bridge from Java to the Python world
  • Hybrid Programming - augment your py5 Sketches with Java code
  • Attribute Errors now provide coding suggestions. For example:
    py5 encountered an error in your code:

    File "<ipython-input-6-b7441cc777da>", line 2, in setup
        1    def setup():
    --> 2        c = py5.colorr(255)
        3        py5.background(c)
        ..................................................
        py5.colorr = # AttributeError
            py5 = <module 'py5' from '/Users/jim/INSTALL/anaconda3/envs/
            py5/lib/python3.8/site-packages/py5/__init__.py'>
        ..................................................

    AttributeError: py5 has no function or field named "colorr". Did you mean "color"?
  • Small changes to Py5Vector to make it more consistent with Processing's PVector class
  • The create_image_from_numpy() method now supports BGR and BGRA color channel ordering

API changes

  • The get() method has been renamed get_pixels() and a new method set_pixels() has been added
  • The random_choice() method has been renamed random_sample() and a new implementation of random_choice() has been created

New Contributors

Bug Fixes

Full Changelog: py5-1286-0018-0.8.3a1...py5-1292-0019-0.9.0a0