Tetra v0.6.0 Release Notes
Release Date: 2021-02-05 // about 3 years ago-
โ Added
- All drawable objects now have an inherant
draw
method, instead of relying onDrawable
/graphics::draw
. Texture::draw_region
can be used to draw a sub-section of a texture.Texture::draw_nine_slice
can be used to draw UI panels.DrawParams::to_matrix
has been added, which can be used to create a transformation matrix matching the behaviour ofDrawParams
.Font
now has afrom_vector_file_data
constructor, which is a shortcut forVectorFontBuilder::from_file_data(data)?.with_size(ctx, size)
. (@fossegutten in #232)Mesh
now has methods for getting and setting the winding order, which will automatically be applied when drawing it.Mesh
now has methods for getting, enabling and disabling backface culling.- A new
Canvas::multisampled
constructor has been added, allowing for off-screen rendering with MSAA. - ๐ More example links have been added to the docs, where appropriate.
๐ Changed
- ๐ฅ Breaking: Mesh and shape rendering types have been moved to
graphics::mesh
, to avoid cluttering the maingraphics
module. - ๐ฅ Breaking: The
zoom
field onCamera
has been renamed toscale
, and is now aVec2<f32>
.- Note that numeric operations are implemented on
Vec2<f32>
forf32
, so you can still add/subtract/multiply/divide both components at the same time.
- Note that numeric operations are implemented on
- ๐ฅ Breaking:
Text::draw
andText::get_bounds
now take&mut self
.- This better reflects the fact that they cache geometry under the hood, and avoids
RefCell
overhead.
- This better reflects the fact that they cache geometry under the hood, and avoids
- ๐ฅ Breaking:
NineSlice
is now a config object forTexture::draw_nine_slice
, rather than a wrapper for a texture. - ๐ฅ Breaking:
Font
are now sized and positioned more accurately, and should look the same in Tetra as in other programs. (@fossegutten in #229)- This is not an API breaking change, but will alter the behaviour of existing games.
- ๐ฅ Breaking: FLAC audio support has been disabled by default - use the
audio_flac
feature to re-enable it. - ๐ฅ Breaking: Updated
vek
to 0.13.- As Vek is exposed via Tetra's API in the form of the
tetra::math
module, this is potentially a breaking change.
- As Vek is exposed via Tetra's API in the form of the
time::get_delta_time
now returns a fixed value when called fromupdate
in fixed timestep mode.- Using delta time in fixed timestep mode is not required, but can be useful if you want to measure things in 'per second' terms rather than 'per frame'.
- Previously, trying to use delta time in this way could introduce floating point error/non-determinism into your game logic, and would break in the case of a double update.
- The audio files for the
tetras
example are no longer ridiculously big.
โ Removed
- ๐ฅ Breaking:
graphics::draw
and theDrawable
trait has been removed.- Use the
draw
method on individual types instead. - See https://github.com/17cupsofcoffee/tetra/issues/94#issuecomment-770303033 for the rationale behind this change.
- Use the
- ๐ฅ Breaking:
DrawParams::clip
has been removed.Texture::draw_region
can be used instead.
- ๐ฅ Breaking:
graphics::get_front_face_winding
andgraphics::set_front_face_winding
have been removed.Mesh::front_face_winding
andMesh::set_front_face_winding
can be used instead.
- ๐ฅ Breaking:
graphics::ui
has been removed.NineSlice
is now located ingraphics
.
- All drawable objects now have an inherant