P5

Latest version: v0.8.4

Safety actively analyzes 629678 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 5

0.6.0

We're happy to announce a developmental release from this Google Summer of Code 2019 project! This release includes addition of new APIs. In addition to the new APIs, many examples and tutorials are added for p5 modules (the details can be found on the p5 [documentation website](https://p5.readthedocs.io/en/latest/releasenotes/0.6.0.html)).

List of new APIs

* Typography methods `p5.text_align`, `p5.text_leading` and `p5.text_size` allows the user to control different position and size attributes of the text. Methods `p5.text_ascent`, `p5.text_descent` and `p5.text_width` can be used to obtain different dimensional attributes of text.

* `p5.load_shape` function allows the user to load an SVG file which can be rendered on the screen. The SVG shape is converted into PShape primitives and rendered on the screen using `p5.shape` method.

* The methods `p5.begin_shape` and `p5.end_shape` can be used to make custom shapes defined by different vertex types (`p5.vertex`, `p5.curve_vertex`, `p5.bezier_vertex`, `p5.quadratic_vertex`). Contours inside a shape can also be created using `p5.begin_contour` and `p5.end_contour` methods.

* Stroke methods allows the user to control the stroke width and styles:

- `p5.stroke_weight`: allows for specifying the width of stroke
- `p5.stroke_cap`: allows the user to set the style of line endings
- `p5.stroke_join`: allows the user to set the style of joints which connect the line segments

* This release introduces limited 3D support. New functions for :

- The `p5.camera` allows for specifying the camera coordinates in 3D space
- The projection functions `p5.ortho` and `p5.perspective` allow the user to control the type of projection system being used to render 3D objects on the screen
- New 3D shape primitives are added: `p5.box`, `p5.plane`, `p5.sphere`, `p5.ellipsoid`, `p5.cylinder`, `p5.cone`, `p5.torus`

List of issues fixed in this release

* 129 millis() does not go beyond 1 second and gives microseconds()
* 114 Rectangle not overlaying on line correctly
* 91 Arc does not render correctly with transparency
* 90 arc outline shows up as line in corner of window

This release also includes contributions from edurojasr, abhikpal and jeremydouglass. Thanks :)

0.5.0

p5 version 0.5.0 is the final release for the [Google Summer of Code 2018 project](https://summerofcode.withgoogle.com/projects/#4911995556462592>) by Abhik Pal The project was supervised by Manindra Mohrarna of the Processing Foundation. The goal of the project were:

1. Move the internal windowing and OpenGL framework to [vispy](https://vispy.org)
2. Add support for user defined polygons
3. Add image support

We met all of these goals completely. The first was covered by a [release from earlier in the summer](https://github.com/p5py/p5/releases/tag/v0.4.0a1.dev2). These release notes summarize our later two goals. In addition to the stated goals we were also able to add minimal typography support and port some tutorials from Processing to p5:

* Color by Daniel Shiffman
* Vectors by Daniel Shiffman
* Electronics by Hernando Berragán and Casey Reas

API Additions
-------------

* The `p5.PShape` class is equivalent to [PShape](https://processing.org/reference/PImage.html) in Processing. This allows creation of arbitrary user defined polygons that can have their own style (fill, stroke, etc) and transform (rotation, translation) attributes.

* The `p5.PImage` class allows for manipulating images in p5. Most of the API is similar to that of Processing's. Each image object "pretends" to be a 2D array and hence operations for cropping, copying, and pasting data can have implemented as indexing operations on the image. For instance, given some image ``img`` with dimensions 800 × 600, ``img[400:, :300]`` gives a new image with the required region. Individual pixels can be set / read as `p5.Color` objects though indices into the image. The class also includes functionality to apply filters and blend two images together.

* The `p5.load_image` and `p5.image` function allow, respectively, loading and displaying images on the screen.

* The `p5.image_mode` function controls how parameters to `p5.image` are interpreted.

* `p5.tint` and the related `p5.no_tint` function allow for setting and disabling tinting of images that are drawn on the screen.

* The `p5.load_pixels` context manager loads the current display as a global ``pixels`` PImage object. This combines functionality of Processing's [`loadPixels()`](https://processing.org/reference/loadPixels_.html) and [`updatePixels()`](https://processing.org/reference/updatePixels_.html).

* `p5.save` and `p5.save_frame` methods allow users to either save the current state of the sketch or the final rendered frame as an image.

* This release also introduces some basic typography functions like `p5.text` for displaying text on screen. The `p5.load_font` and `p5.create_font` allow loading font files to change the display typeface using `text_font`. As of now, only TrueType (ttf) and bitmap fonts are sup

0.4.0a1.dev2

We're happy to announce a developmental release from this year's Google Summer of Code project! While we haven't changed the public API much, the whole backend has been re-written to use vispy. This has allowed us to remove many platform specific issues. In particular, this release closes the following pending issues and pull requests:

- 10: Sketch window stops refreshing on Mac.
- 15: Blank sketch window on Mac
- 16: Mouse_x and mouse_y returning negative values
- 17: Set range limit on mouse_x and mouse_y values
- 18: matmul operator doesn't work on Python 3.4 and less.
- 22: Replaced with np.dot()
- 23: Tuple unpacking incompatible with Python 3.4 and less.
- 35: Removed pyglet.window.get_platform()
- 36: Fixed distance() of class Vector by adding np.sqrt
- 37: raise an error, when Vector.normalize() tries to normalize a "zero-vector"
- 38: raise ValueError when Magnitude of Vector is 0
- 39: `background()` inside `setup()` behaves strangely
- 40: fix bug 23: Tuple unpacking incompatible with Python 3.4 and less
- 41: matmul operator on Python version <= 3.4 (rel: 18)
- 47: key variable not working
- 49: Fix retina issues on the mac.
- 50: 49 breaks the documentation auto generation
- 9: Sketch does not cover the entire window on retina displays.

This release also includes contributions from parsoyaarihant, Devrim-Celik, hx2A, and antiboredom. Thank you : )

Head over to the [installation page](http://p5.readthedocs.io/en/latest/install.html) for getting started with the new p5 version! The documentation is hosted on p5.rtfd.io and we have many example sketches in a [separate repository](https://github.com/p5py/p5-examples).

We're excited to hear what you have to say!

0.3.0a1

People,

We've been working for the last twelve or so weeks to get most of the internal plumbing done and expose an API that people can start playing around with. And today we're happy to announce the first alpha release of p5 :tada:

As of this release, we have support for:

* Running basic p5 sketches.
* An interface to events and event handlers.
* Drawing 2D shapes.
* Full support for parsing and using colors (except support for using hex-codes)
* Full support for all utility functions for math, vectors, etc.

Links to help you get started:

* [Documentation](https://p5.readthedocs.io/)
* ["p5 for Processing Users" guide](http://p5.readthedocs.io/en/latest/guides/for-processing-users.html)
* [Example sketches](https://github.com/p5py/p5-examples)
* [Project homepage](https://p5py.github.io/)

Mac users might face some issues getting the sketches to run. We haven't been able to consistently reproduce the issues, but please take a look at issue 9 and issue 10 .

Meanwhile, as we write more documentation, fix bugs, and port tutorials from Processing, we would love to know what you think! Couple of ways you can reach out to us:

* Take a look at a [CONTRIBUTING](https://github.com/p5py/p5/blob/master/CONTRIBUTING.rs) file if you want to report bugs, make feature requests, and want to help out in general.
* We've [opened a thread on the Processing forum](https://forum.processing.org/two/discussion/23918/announcement-introducing-p5-for-python-a-native-python-port-of-processing) and on [reddit](https://www.reddit.com/r/processing/comments/6vtmwm/announcement_introducing_p5_for_python_a_native/), use those for questions and general comments.


p5 started off as a Google Summer of Code project and even though the official coding period will end in little less than a week, development on p5 will continue. Feedback, contributions, and criticism are more than welcome :)

0.02

0.01

Page 4 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.