1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! Character animations rendered as RGBA frames and displayed in a terminal.
//!
//! [`SpriteAnimation`] supports frame sequences and regular RGBA sprite sheets.
//! [`Iterm2`] preserves transparency in Konsole; [`Sixel`] provides solid-background
//! output for SIXEL-capable terminals. [`Kitty`] sends RGBA to terminals supporting
//! the Kitty graphics protocol.
//! Applications own the clock, playback loop and terminal layout.
//! [`TerminalProbe`] optionally queries capabilities when explicitly driven by
//! the host; animation and backend APIs never start a probe themselves.
//!
//! ```no_run
//! use std::{io, time::Duration};
//! use anitty::{Animation, Backend, Sixel, SpriteAnimation};
//!
//! let image = image::open("character.webp")?.into_rgba8();
//! let sheet = anitty::RgbaFrame::new(image.width(), image.height(), image.into_raw())?;
//! let mut animation = SpriteAnimation::from_sheet(
//! sheet, 64, 64, Duration::from_millis(100),
//! )?;
//! // A solid background paints over old frames. Use Iterm2 to preserve alpha;
//! // Konsole replaces same-sized images at the same position without clearing.
//! let mut backend = Sixel::new([0, 0, 0]);
//! let mut output = io::stdout().lock();
//! backend.draw(animation.render(Duration::ZERO, 64, 64)?, &mut output)?;
//! // Advance time and draw at the same position to replace the previous frame.
//! backend.draw(animation.render(Duration::from_millis(100), 64, 64)?, &mut output)?;
//! # Ok::<(), anitty::Error>(())
//! ```
pub use ;
pub use ;
pub use ;
pub use Error;
pub use RgbaFrame;
pub use ;