Tetra v0.6.3 Release Notes

Release Date: 2021-04-09 // about 3 years ago
  • โž• Added

    • ๐Ÿ‘ BMFont-formatted fonts are now supported, via Font::bmfont and BmFontBuilder.
    • Various std operator traits have been implemented for the combination of Color and f32, allowing for all four components to be operated on at once.
      • This can be especially useful when working with premultiplied alpha - to set the opacity of a opaque color, you can now just multiply it by an f32.
    • Color now has a to_premultiplied method, which can be used to convert a color into its premultiplied version.
    • Color can now be converted to and from [f32; 4] and [u8; 4] via From and Into.
    • The ImageData struct can be used to load and manipulate image data on the CPU, without the need for a Context.
      • This can be useful for asset loading/pre-processing.
      • To avoid future breaking changes if/when Tetra gains support for multiple pixel formats, the API doesn't currently give access to the underlying raw pixel data. It instead operates purely on Colors, automatically converting to and from as needed.
    • 0๏ธโƒฃ Color and Vertex now implement Default, with the default values being all zeroes (for consistency with the vector types, and to make them more useful for zeroing out buffers).

    ๐Ÿ”„ Changed

    • ๐Ÿ‘Œ Improved docs for the UniformValue trait.