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::parser::color::Color;
|
2025-11-09 03:00:20 +01:00
|
|
|
use crate::parser::gradient::Gradient;
|
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 anyhow::Result;
|
|
|
|
|
|
2025-11-09 03:00:20 +01:00
|
|
|
#[derive(Debug, Clone)]
|
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 struct GradientEngine {
|
|
|
|
|
gradient: Gradient,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl GradientEngine {
|
|
|
|
|
pub fn new(gradient: Gradient) -> Self {
|
|
|
|
|
Self { gradient }
|
|
|
|
|
}
|
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 from_string(gradient_str: &str) -> Result<Self> {
|
|
|
|
|
let gradient = Gradient::parse(gradient_str)?;
|
|
|
|
|
Ok(Self::new(gradient))
|
|
|
|
|
}
|
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 color_at(&self, t: f64) -> Color {
|
|
|
|
|
self.gradient.color_at(t)
|
|
|
|
|
}
|
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 colors(&self, steps: usize) -> Vec<Color> {
|
|
|
|
|
self.gradient.colors(steps)
|
|
|
|
|
}
|
2025-11-09 03:00:20 +01:00
|
|
|
}
|