0.6.0¶
p5 version 0.6.0 is the final release for the Google Summer of Code 2019 project by Arihant Parsoya. The project was supervised by Abhik Pal and Sam Lavigne of the Processing Foundation. The goals of the project were:
- Add tutorials and examples for Processing modules
- Complete typography module
- Improving the Shape Class
- Adding test suit to p5.py modules
- Add 3D capabilities
We met the goals 1-4 completely. The last goal was completed partially as we were facing issues with vispy depth testing functionality. All the examples and tutorials for existing modules were imported from Processing website with live interactive sketch created using p5.js. Tests for all submodules are added using Pythons inbuilt unittest library. Additionally, bugs posted on github issue tracker are fixed.
API Additions¶
- Typography methods
p5.text_align()
,p5.text_leading()
andp5.text_size()
allows the user to control different position and size attributes of the text. Methodsp5.text_ascent()
,p5.text_descent()
andp5.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 usingp5.shape()
method.- The methods
p5.begin_shape()
andp5.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 usingp5.begin_contour()
andp5.end_contour()
methods. - Stroke methods allows the user to control the stroke width and styles:
p5.stroke_weight()
: allows for specifying the width of strokep5.stroke_cap()
: allows the user to set the style of line endingsp5.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()
andp5.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()
- The