Skip to content

raylib-py 4.2.0.post1

Compare
Choose a tag to compare
@overdev overdev released this 28 Nov 17:08
· 11 commits to master since this release

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 or some_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 +, -, and abs():
    Operators are supported between:
    • Vectors;
    • Vectors and ints or floats;
    • Vectors and sequences of ints or 'float's,
    • Vectors and Matrixes, 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 and y + height * .5 respectively;
    • r, b as right and bottom: x + width and y + 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