Releases: junkdog/tachyonfx
tachyonfx-0.10.1
tachyonfx 0.10.1 - 2024-12-08
Documentation
- Improved code examples with complete imports and explicit color values instead of theme references
- Updated motion-related documentation to use
Motion
enum instead ofDirection
Fixed
fx::effect_fn
/fx::effect_fn_buf
: removedDebug
requirement for state parameter.
Breaking Changes introduced in 0.10.0
- Added
Debug
requirement toShader
trait - any custom shaders must now implementDebug
tachyonfx 0.10.0 - 2024-12-07
Added
- Implemented
Debug
for all effect types and supporting structs fx::dissolve_to()
: dissolves both the characters and style over the specified duration.fx::coallesce_from()
: reforms both the characters and style over the specified duration.- Example gifs and better rustdoc for the fx module.
Changed/Deprecated
Motion
replacesDirection
to to avoid name clashing with ratatui'sDirection
enum.
The deprecatedDirection
is a type alias forMotion
.
Fixed
fx::with_duration
: clarified misleading documentation.
tachyonfx-0.10.0
tachyonfx 0.10.0 - 2024-12-07
Added
fx::dissolve_to()
: dissolves both the characters and style over the specified duration.fx::coallesce_from()
: reforms both the characters and style over the specified duration.- Example gifs and better rustdoc for the fx module.
Changed/Deprecated
Motion
replacesDirection
to to avoid name clashing with ratatui'sDirection
enum.
The deprecatedDirection
is a type alias forMotion
.
Fixed
fx::with_duration
: clarified misleading documentation.
tachyonfx-0.9.3
tachyonfx 0.9.3 - 2024-11-20
Fixed
- sweep and slide effects now honor applied CellFilters.
tachyonfx 0.9.2 - 2024-11-17
Fixed
Cargo.lock
no longer omitted from the crate package. This was an oversight in previous releases.- Fixed test build failure when the
std-duration
feature is enabled.
tachyonfx 0.9.0 - 2024-11-17
Breaking Changes
Shader::execute() Signature Update
Previous:
fn execute(&mut self, alpha: f32, area: Rect, cell_iter: CellIterator)
New:
fn execute(&mut self, duration: Duration, area: Rect, buf: &mut Buffer)
When implementing the Shader
trait, you must override one of these methods:
execute()
(automatic timer handling)- Effect timer handling is done automatically; use for standard effects that rely on default timer handling
- Most common implementation choice
process()
(manual timer handling)- Use when custom timer handling is needed
- Gives full control over timing behavior
- Must report timer overflow via return value
Important: The default implementations of both methods are no-ops and cannot be used alone. You must override
at least one of them for a functioning effect.
Added
CellFilter::EvalCell
: filter cells based on a predicate function that takes a&Cell
as input.blit_buffer_region()
: new function to support copying specific regions from source buffers.render_buffer_region()
method added toBufferRenderer
trait to enable region-based buffer rendering.
Changed
blit_buffer()
: now omits copying cells wherecell.skip
is true. This behavior
also carries over to theBufferRenderer
trait andblit_buffer_region()
.
Fixed
std-duration
feature: mismatched types error when building the glitch effect. Thanks
to @Veetaha for reporting.
tachyonfx-0.9.2
tachyonfx 0.9.2 - 2024-11-17
Fixed
Cargo.lock
no longer omitted from the crate package. This was an oversight in previous releases.- Fixed test build failure when the
std-duration
feature is enabled.
tachyonfx 0.9.0 - 2024-11-17
Breaking Changes
Shader::execute() Signature Update
Previous:
fn execute(&mut self, alpha: f32, area: Rect, cell_iter: CellIterator)
New:
fn execute(&mut self, duration: Duration, area: Rect, buf: &mut Buffer)
When implementing the Shader
trait, you must override one of these methods:
execute()
(automatic timer handling)- Effect timer handling is done automatically; use for standard effects that rely on default timer handling
- Most common implementation choice
process()
(manual timer handling)- Use when custom timer handling is needed
- Gives full control over timing behavior
- Must report timer overflow via return value
Important: The default implementations of both methods are no-ops and cannot be used alone. You must override
at least one of them for a functioning effect.
Added
CellFilter::EvalCell
: filter cells based on a predicate function that takes a&Cell
as input.blit_buffer_region()
: new function to support copying specific regions from source buffers.render_buffer_region()
method added toBufferRenderer
trait to enable region-based buffer rendering.
Changed
blit_buffer()
: now omits copying cells wherecell.skip
is true. This behavior
also carries over to theBufferRenderer
trait andblit_buffer_region()
.
Fixed
std-duration
feature: mismatched types error when building the glitch effect. Thanks
to @Veetaha for reporting.
tachyonfx-0.8.0
tachyonfx 0.8.0 - 2024-10-21
This is just a tiny release in order to be compatible with the latest ratatui
version.
Added
- new
minimal
example demonstrating how to get started with tachyonfx. Thanks to @orhun for the contribution!
Changed
Color::to_rgb
: updated rgb values of standard terminal colors to be more conformant.
Breaking
ratatui
updated to 0.29.0. This is also the minimum version required for tachyonfx.
tachyonfx-0.7.0
tachyonfx 0.7.0 - 2024-09-22
Added
sendable
feature: Enables theSend
trait for effects, shaders, and associated parameters. This allows effects to
be safely transferred across thread boundaries. Note that enabling this feature requires allShader
implementations
to beSend
, which may impose additional constraints on custom shader implementations.ref_count()
: wraps a value in anRc<RefCell<T>>
or anArc<Mutex<T>>
depending on thesendable
feature.
Changed
SlidingWindowAlpha
: Now uses multiplication instead of division when calculating alpha values for the gradient.EffectTimer::alpha
: removed two redundant divisions.
Fixed
EffectTimer::alpha
now correctly returns 0.0 for reversed timers with zero duration.CellIterator
now uses the intersection of the given area and the buffer's area, preventing panics from
out-of-bounds access.fx::sweep_in
,fx::sweep_out
,fx::slide_in
,fx::slide_out
: now uses a "safe area" calculated as the
intersection of the effect area and buffer area, preventing out-of-bounds access.
tachyonfx-0.6.0
tachyonfx 0.6.0 - 2024-09-07
This release introduces a lot of breaking changes in the form of added and removed parameters.
Sorry for any inconvenience this may cause, I'll try to tread more carefully in the future.
Added
- New "std-duration" feature to opt-in to using
std::time::Duration
, which is the same behavior as before. - New
tachyon::Duration
type: a 4-byte wrapper around u32 milliseconds. When the "std-duration" feature is enabled,
it becomes an alias for the 16-bytestd::time::Duration
.
Changed
- Replaced
rand
crate dependency with a fastSimpleRng
implementation. render_as_ansi_string()
produces a more compact output by reducing redundant ANSI escape codes.
Breaking
tachyonfx::Duration
is now the default duration type.- Replace usage of
std::time::Duration
withtachyonfx::Duration
. fx::sweep_in
,fx::sweep_out
,fx::slide_in
,fx::slide_out
: addedrandomness
parameter.fx::dissolve
,fx::coalesce
: removedcycle_len
parameter, as cell visibility is recalculated on the fly.fx::sequence
,fx::parallel
: now parameterized with&[Effect]
instead ofVec<Effect>
.
Deprecated
EffectTimeline::from
is deprecated in favor ofEffectTimeline::builder
.
tachyonfx-0.5.0
tachyonfx 0.5.0 - 2024-08-21
The effect timeline widget visualizes the composition of effects. It also supports rendering the
widget as an ansi-escaped string, suitable for saving to a file or straight to println!()
.
Added
fx::delay()
: delays the start of an effect by a specified duration.fx::offscreen_buffer()
: wraps an existing effect and redirects its rendering
to a separate buffer. This allows for more complex effect compositions and can
improve performance for certain types of effects.fx::prolong_start
: extends the start of an effect by a specified duration.fx::prolong_end
: extends the end of an effect by a specified duration.fx::translate_buf()
: translates the contents of an auxiliary buffer onto the main buffer.widget::EffectTimeline
: a widget for visualizing the composition of effects.EffectTimeline::save_to_file()
: saves the effect timeline to a file.BufferRenderer
trait: enables rendering of one buffer onto another with offset support.
This allows for more complex composition of UI elements and effects.- fn
blit_buffer()
: copies the contents of a source buffer onto a destination buffer with a specified offset. - fn
render_as_ansi_string()
: converts a buffer to a string containing ANSI escape codes for styling. - new example:
fx-chart
.
Breaking
- Shader trait now requires
name()
,timer()
andas_effect_span()
methods. ratatui
updated to 0.28.0. This is also the minimum version required for tachyonfx.
tachyonfx-0.4.0
tachyonfx 0.4.0 - 2024-07-14
Added
CellFilter::PositionFn
: filter cells based on a predicate function.fx::slide_in()
andfx::slide_out()
: slides in/out cells by "shrinking" the cells horizontally or
vertically along the given area.fx::effect_fn_buf()
: to create custom effects operating on aBuffer
instead ofCellIterator
.Shader::reset
: reinitializes the shader(*) to its original state. Previously, the approach was to
clone the shader from a copy of the original instance, occasionally resulting in unintended behavior
when certain internal states were expected to persist through resets.
*: Note that "shader" here is used loosely, as no GPU is involved, only terminal cells.
Breaking
fx::resize_area
: signature updated withinitial_size: Size
, replacing the u16 tuple.
Fixed
fx::translate()
: translate can now move out-of-bounds.fx::translate()
: hosted effects with extended duration no longer end prematurely.fx::effect_fn()
: effect state now correctly resets between iterations when usingfx::repeat()
,fx::repeating()
andfx::ping_pong()
.fx::resize_area()
: fixed numerous problems.
tachyonfx-0.3.0
tachyonfx 0.3.0 - 2024-06-30
Changed
fx::effect_fn()
: updated the function signature to include an initial state parameter andShaderFnContext
context parameter. The custom effect closure now takes three parameters: mutable state,ShaderFnContext
, and a
cell iterator.ratatui
updated to 0.27.0. This is also the minimum version required for tachyonfx.