Skip to main content

Crate hjkl_splash

Crate hjkl_splash 

Source
Expand description

hjkl-splash — rendering-agnostic splash-screen animation.

Emits pure SplashCell items via an iterator; consumers (TUI/GUI) translate to their own rendering surface. The crate owns its time source — Splash::cells takes &self and reads the wall clock internally, so consumers cannot accidentally desynchronise the animation by skipping a per-iteration advance() call (the v0.1 footgun).

Modules§

presets
Built-in presets for the hjkl-splash animation.
start_screen
High-level StartScreen wrapper for consumers that want a ready-to-use splash animation wired to app palette colours.

Structs§

Layout
Bounding box of the art block within the terminal/canvas.
Rgb
24-bit RGB colour value.
Splash
The animation state machine.
SplashCell
A single cell to be painted this tick.

Enums§

CellKind
Describes what role a cell plays in the current animation frame.

Constants§

DEFAULT_PERIOD
Default tick period — ~8 Hz (120 ms). Matches the canonical hjkl feel (in v0.1 and earlier, manual advance() was driven by a 120 ms poll timeout in the consumer’s event loop, so this preserves that cadence by default). Consumers wanting smoother motion can opt in via Splash::with_period.
DEFAULT_TRAIL_LEN
Default trail length.

Functions§

default_trail_color
Default ramp for trail age → Rgb.