raylib-py 4.2.0.post1
Package release for the C Raylib 4.2 Post-Release 1
This release was made as output of another project, as mentioned in #45.
Features:
- PEP8 naming convention;
- Type hinting (instead of type annotation);
- Structures with functions as methods and properties (like
some_vec2.lengthorsome_sound.play(); - Vector{2,3,4}, Rectangle and Color have attribute swizzling (like
my_vec4 = some_vec2.xxyy); - Pretty printing: most structures implement
__str__()and__repr__()in a friendly way; - Context managers: begin_* and end_* functions can be called as context managers;
- Context managers for some structures: Camera{2,3}D, Shader and others;
- RLGL and RayMath functions exposed
Fixes:
- Colors passed as sequences in functions had the red component repeated in the green one;
Texturestructure wrapped without functions as methods;Rectanglemissing__str__and__repr__default implementations;- Context managers not being included in
__all__;
Added:
- Vector{2,3} overload for binary operators
+,-,*and/(//not implemented); unary+,-, andabs():
Operators are supported between:Vectors;Vectors andints orfloats;Vectors and sequences ofints or 'float's,Vectors andMatrixes, for multiplication only.
- Better swizzling for
Rectangle:
When doing swizzling in rects, more attributes become available:c,mas center and middle:x + width * .5andy + height * .5respectively;r,bas right and bottom:x + widthandy + heightrespectively;- swizzling can include from 1 up to 4 attributes, not only 4 anymore.
Known Issues:
- Callback for logging will not work
- Functions with
varargwill not work - Avoid string manipulation functions
- Some examples are broken due to API changes
- For some unknown reason, the 32bit binary for Linux is not available.
Would you like to have a more customized binding for raylib?
Please, take a look at this project: raylibpyctbg