Skip to content

Beta Version 4

Pre-release
Pre-release
Compare
Choose a tag to compare
@Mtax-Development Mtax-Development released this 05 Sep 18:55
· 274 commits to master since this release

The changes in this version focus on redesigning parts of the code relating to drawing setup, as well as vector calculation in order to bring more consistency and intuitiveness to their use. In effect, several features changed the way they are used. Therefore, it is recommended to take extra caution while upgrading existing code to this version.


Changes from Beta Version 3:

Changes to the existing content:
| Sprite: Changed the fromFile() method into a construction type.
| Surface: Now enforces the minimum size of one pixel at creation.
| Vector4.interpolate(): Changed the arguments to a single Vector2.
| Vector2: Separated code related to the support of Scale as an argument in place of Vector2. Scale used instead of a Vector2 will still work in most of cases as their properties are the same and Vector2 can still be constructed from a Scale, but Scale is no longer listed as a supported argument for methods of a Vector2.
| Font: Changes to how construction types are referred to in code and documentation. The constructor type previously referred to as "file" in code and "Resource" in documentation is now referred to only as "file". The constructor type previously referred to as "sprite (utf-8)" in code and documentation is now referred to as "sprite (UTF-8)".
| Vector2/Vector4: The sum(), sumX(), sumY(), difference(), differenceX(), differenceY(), product(), productX(), productY(), quotient(), quotientX(), quotientY() methods now support more argument types, {real} and {Vector2} for both Vector2 and Vector4, as well as {Vector4} for Vector4 only.
| Vector2/Vector4: The sum(), difference(), product() methods no longer check if the specified argument is self to treat the execution as if no argument was provided.

Additions:
+ Sprite: "From Surface" constructor.
+ RangedValue.isMinimum(), RangedValue.isMaximum() methods.
+ StringParser.contains() method.
+ Vector4.split() method.
+ Vector2.contains(), Vector4.contains() methods.

Fixes:
- General minor code and documentation fixes.

Instructions for conversion from the previous version:
Sprite.fromFile(): Adjust the code so it uses the "File" construction type instead of this method.
Vector4.interpolate(): Adjust the code to specify the arguments as a Vector2 instead of x and y separately.
Font: Adjust the code which relied on string parsing of the type property and the result of toString() call to expect a string containing "sprite (UTF-8)" instead of "sprite (utf-8)".
Vector2/Vector4: Adjust the code which specified self as the argument of the sum(), difference() and product() methods to no longer provide any argument.