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.length
orsome_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;
Texture
structure wrapped without functions as methods;Rectangle
missing__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:Vector
s;Vector
s andint
s orfloat
s;Vector
s and sequences ofint
s or 'float's,Vector
s andMatrix
es, for multiplication only.
- Better swizzling for
Rectangle
:
When doing swizzling in rects, more attributes become available:c
,m
as center and middle:x + width * .5
andy + height * .5
respectively;r
,b
as right and bottom:x + width
andy + height
respectively;- swizzling can include from 1 up to 4 attributes, not only 4 anymore.
Known Issues:
- Callback for logging will not work
- Functions with
vararg
will 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