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§
- Cell
Iterator CellIterator
provides an iterator over terminal cells.- Cell
Predicate - A predicate that evaluates cells based on their position and properties using a specified filter strategy.
- Color
Mapper Deprecated - 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. - Effect
Manager - Manages a collection of terminal UI effects, including uniquely identified effects that can be replaced/cancelled by new effects with the same id.
- Effect
Timer - 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.
- Simple
Rng - A simple pseudo-random number generator using the Linear Congruential Generator algorithm.
Enums§
- Cell
Filter - A filter mode that enables effects to operate on specific cells based on various criteria.
- Color
Space - Defines the color space to use for color interpolation.
- Interpolation
- Motion
- Specifies the direction of movement for visual effects like sweeps and slides.
Traits§
- Buffer
Renderer - A trait for rendering the contents of one buffer onto another.
- Centered
Shrink - A trait that provides a method to calculate a centered, shrunk rectangle within the bounds of the original rectangle.
- Effect
Renderer - HslConvertable
Deprecated - Interpolatable
- A trait for interpolating between two values.
- Into
Effect - Range
Sampler - 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. - Thread
Safety Marker - ToRgb
Components
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.