Crate tachyonfx

Source
Expand description

tachyonfx - A ratatui library for creating shader-like effects in terminal UIs

This library provides a collection of effects that can be used to enhance the visual appeal of terminal applications, offering capabilities such as color transformations, animations, and complex effect combinations.

Modules§

dsl
tachyonfx Effect DSL Documentation
fx
Effects in tachyonfx operate on terminal cells after widgets have been rendered to the screen. When an effect is applied, it modifies properties of the already-rendered cells - like their colors, characters, or visibility. This means that the typical flow is:
widget

Macros§

default_shader_impl
A macro for implementing common Shader trait functions.

Structs§

CellIterator
CellIterator provides an iterator over terminal cells.
CellPredicate
A predicate that evaluates cells based on their position and properties using a specified filter strategy.
ColorMapperDeprecated
A utility struct for mapping and transforming colors based on a given alpha value. The ColorMapper caches the original color and alpha value to avoid redundant transformations.
Effect
Represents an effect that can be applied to terminal cells. The Effect struct wraps a shader, allowing it to be configured and applied to a specified area and cell selection.
EffectManager
Manages a collection of terminal UI effects, including uniquely identified effects that can be replaced/cancelled by new effects with the same id.
EffectTimer
A struct for managing the timing and interpolation of effects. The EffectTimer controls the duration and progress of an effect, allowing it to be reversed, reset, and processed over time.
LruCache
A fixed-size LRU (Least Recently Used) cache with const generic capacity.
SimpleRng
A simple pseudo-random number generator using the Linear Congruential Generator algorithm.

Enums§

CellFilter
A filter mode that enables effects to operate on specific cells based on various criteria.
ColorSpace
Defines the color space to use for color interpolation.
Interpolation
Motion
Specifies the direction of movement for visual effects like sweeps and slides.

Traits§

BufferRenderer
A trait for rendering the contents of one buffer onto another.
CenteredShrink
A trait that provides a method to calculate a centered, shrunk rectangle within the bounds of the original rectangle.
EffectRenderer
HslConvertableDeprecated
Interpolatable
A trait for interpolating between two values.
IntoEffect
RangeSampler
Shader
A trait representing a shader-like object that can be processed for a duration. The Shader trait defines the interface for objects that can apply visual effects to terminal cells over time.
ThreadSafetyMarker
ToRgbComponents

Functions§

blit_buffer
Copies the contents of a source buffer onto a destination buffer with a specified offset.
blit_buffer_region
Copies the specified region of a source buffer onto a destination buffer with a specified offset.
color_from_hsl
Converts HSL (Hue, Saturation, Lightness) values to a ratatui Color.
color_from_hsv
Converts HSV (Hue, Saturation, Value) values to a ratatui Color.
color_to_hsl
Converts a ratatui Color to HSL (Hue, Saturation, Lightness) components.
color_to_hsv
Converts a ratatui Color to HSV (Hue, Saturation, Value) components.
ref_count
Wraps a value in a reference-counted smart pointer.
render_as_ansi_string
Converts a Buffer to an ANSI-encoded string representation.

Type Aliases§

Duration
RefCount