Initial commit: Piglet - Animated figlet wrapper
Add complete Rust implementation with:
- 20+ motion effects (fade, slide, scale, typewriter, wave, bounce, etc.)
- 18+ easing functions (linear, quad, cubic, elastic, back, bounce)
- Color support (CSS4 colors, hex codes, gradients)
- Figlet integration with custom fonts and options
- Cross-platform support (Linux, macOS, Windows)
- Comprehensive CI/CD workflows
- Full test suite with integration tests
- Documentation (README.md, CLAUDE.md)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 01:53:26 +01:00
|
|
|
pub mod easing;
|
2025-11-09 03:00:20 +01:00
|
|
|
pub mod effects;
|
Initial commit: Piglet - Animated figlet wrapper
Add complete Rust implementation with:
- 20+ motion effects (fade, slide, scale, typewriter, wave, bounce, etc.)
- 18+ easing functions (linear, quad, cubic, elastic, back, bounce)
- Color support (CSS4 colors, hex codes, gradients)
- Figlet integration with custom fonts and options
- Cross-platform support (Linux, macOS, Windows)
- Comprehensive CI/CD workflows
- Full test suite with integration tests
- Documentation (README.md, CLAUDE.md)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 01:53:26 +01:00
|
|
|
pub mod renderer;
|
2025-11-09 03:00:20 +01:00
|
|
|
pub mod timeline;
|
Initial commit: Piglet - Animated figlet wrapper
Add complete Rust implementation with:
- 20+ motion effects (fade, slide, scale, typewriter, wave, bounce, etc.)
- 18+ easing functions (linear, quad, cubic, elastic, back, bounce)
- Color support (CSS4 colors, hex codes, gradients)
- Figlet integration with custom fonts and options
- Cross-platform support (Linux, macOS, Windows)
- Comprehensive CI/CD workflows
- Full test suite with integration tests
- Documentation (README.md, CLAUDE.md)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 01:53:26 +01:00
|
|
|
|
|
|
|
|
use crate::color::ColorEngine;
|
|
|
|
|
use crate::utils::{ascii::AsciiArt, terminal::TerminalManager};
|
|
|
|
|
use anyhow::Result;
|
|
|
|
|
|
|
|
|
|
pub struct AnimationEngine {
|
|
|
|
|
ascii_art: AsciiArt,
|
|
|
|
|
duration_ms: u64,
|
|
|
|
|
fps: u32,
|
|
|
|
|
effect: Box<dyn effects::Effect>,
|
|
|
|
|
easing: Box<dyn easing::EasingFunction>,
|
|
|
|
|
color_engine: ColorEngine,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl AnimationEngine {
|
|
|
|
|
pub fn new(ascii_text: String, duration_ms: u64, fps: u32) -> Self {
|
|
|
|
|
Self {
|
|
|
|
|
ascii_art: AsciiArt::new(ascii_text),
|
|
|
|
|
duration_ms,
|
|
|
|
|
fps,
|
|
|
|
|
effect: Box::new(effects::FadeIn),
|
|
|
|
|
easing: Box::new(easing::Linear),
|
|
|
|
|
color_engine: ColorEngine::new(),
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-11-09 03:00:20 +01:00
|
|
|
|
Initial commit: Piglet - Animated figlet wrapper
Add complete Rust implementation with:
- 20+ motion effects (fade, slide, scale, typewriter, wave, bounce, etc.)
- 18+ easing functions (linear, quad, cubic, elastic, back, bounce)
- Color support (CSS4 colors, hex codes, gradients)
- Figlet integration with custom fonts and options
- Cross-platform support (Linux, macOS, Windows)
- Comprehensive CI/CD workflows
- Full test suite with integration tests
- Documentation (README.md, CLAUDE.md)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 01:53:26 +01:00
|
|
|
pub fn with_effect(mut self, effect_name: &str) -> Result<Self> {
|
|
|
|
|
self.effect = effects::get_effect(effect_name)?;
|
|
|
|
|
Ok(self)
|
|
|
|
|
}
|
2025-11-09 03:00:20 +01:00
|
|
|
|
Initial commit: Piglet - Animated figlet wrapper
Add complete Rust implementation with:
- 20+ motion effects (fade, slide, scale, typewriter, wave, bounce, etc.)
- 18+ easing functions (linear, quad, cubic, elastic, back, bounce)
- Color support (CSS4 colors, hex codes, gradients)
- Figlet integration with custom fonts and options
- Cross-platform support (Linux, macOS, Windows)
- Comprehensive CI/CD workflows
- Full test suite with integration tests
- Documentation (README.md, CLAUDE.md)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 01:53:26 +01:00
|
|
|
pub fn with_easing(mut self, easing_name: &str) -> Result<Self> {
|
|
|
|
|
self.easing = easing::get_easing_function(easing_name)?;
|
|
|
|
|
Ok(self)
|
|
|
|
|
}
|
2025-11-09 03:00:20 +01:00
|
|
|
|
Initial commit: Piglet - Animated figlet wrapper
Add complete Rust implementation with:
- 20+ motion effects (fade, slide, scale, typewriter, wave, bounce, etc.)
- 18+ easing functions (linear, quad, cubic, elastic, back, bounce)
- Color support (CSS4 colors, hex codes, gradients)
- Figlet integration with custom fonts and options
- Cross-platform support (Linux, macOS, Windows)
- Comprehensive CI/CD workflows
- Full test suite with integration tests
- Documentation (README.md, CLAUDE.md)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 01:53:26 +01:00
|
|
|
pub fn with_color_engine(mut self, color_engine: ColorEngine) -> Self {
|
|
|
|
|
self.color_engine = color_engine;
|
|
|
|
|
self
|
|
|
|
|
}
|
2025-11-09 03:00:20 +01:00
|
|
|
|
2025-11-09 07:08:24 +01:00
|
|
|
pub async fn run(&self, terminal: &mut TerminalManager) -> Result<bool> {
|
Initial commit: Piglet - Animated figlet wrapper
Add complete Rust implementation with:
- 20+ motion effects (fade, slide, scale, typewriter, wave, bounce, etc.)
- 18+ easing functions (linear, quad, cubic, elastic, back, bounce)
- Color support (CSS4 colors, hex codes, gradients)
- Figlet integration with custom fonts and options
- Cross-platform support (Linux, macOS, Windows)
- Comprehensive CI/CD workflows
- Full test suite with integration tests
- Documentation (README.md, CLAUDE.md)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 01:53:26 +01:00
|
|
|
let renderer = renderer::Renderer::new(
|
|
|
|
|
&self.ascii_art,
|
|
|
|
|
self.duration_ms,
|
|
|
|
|
self.fps,
|
|
|
|
|
&*self.effect,
|
|
|
|
|
&*self.easing,
|
|
|
|
|
&self.color_engine,
|
|
|
|
|
);
|
2025-11-09 03:00:20 +01:00
|
|
|
|
Initial commit: Piglet - Animated figlet wrapper
Add complete Rust implementation with:
- 20+ motion effects (fade, slide, scale, typewriter, wave, bounce, etc.)
- 18+ easing functions (linear, quad, cubic, elastic, back, bounce)
- Color support (CSS4 colors, hex codes, gradients)
- Figlet integration with custom fonts and options
- Cross-platform support (Linux, macOS, Windows)
- Comprehensive CI/CD workflows
- Full test suite with integration tests
- Documentation (README.md, CLAUDE.md)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 01:53:26 +01:00
|
|
|
renderer.render(terminal).await
|
|
|
|
|
}
|
2025-11-09 03:00:20 +01:00
|
|
|
}
|