pardon_dance

Crates.iopardon_dance
lib.rspardon_dance
version69.0.96
created_at2026-01-22 09:21:31.582931+00
updated_at2026-01-22 09:21:31.582931+00
descriptionHigh-quality integration for https://supermaker.ai/video/blog/unlocking-the-magic-of-pardon-dance-the-viral-video-effect-taking-over-social-media/
homepagehttps://supermaker.ai/video/blog/unlocking-the-magic-of-pardon-dance-the-viral-video-effect-taking-over-social-media/
repositoryhttps://github.com/qy-upup/pardon-dance
max_upload_size
id2061190
size9,679
(qy-upup)

documentation

README

pardon-dance

A lightweight Rust crate for generating visually appealing "pardon dance" animations, perfect for social media content creation. Quickly add dynamic movement and engaging effects to your video projects.

Installation

Add the following to your Cargo.toml file under the [dependencies] section: toml pardon-dance = "0.1.0" # Replace with the actual version number

Usage

Here are a few examples demonstrating how to use the pardon-dance crate:

1. Basic Animation with Default Settings:

This example creates a simple pardon dance animation with default parameters. rust use pardon_dance::PardonDance;

fn main() -> Result<(), Box> { let dance = PardonDance::new("Hello, World!")?; dance.save_gif("basic_dance.gif")?; Ok(()) }

2. Customizing Animation Speed and Font Size:

This example demonstrates how to customize the animation speed and font size for a more personalized look. rust use pardon_dance::{PardonDance, Config};

fn main() -> Result<(), Box> { let config = Config { speed: 2.0, // Double the speed font_size: 48, // Larger font size ..Default::default() }; let dance = PardonDance::with_config("Custom Text!", config)?; dance.save_gif("custom_dance.gif")?; Ok(()) }

3. Changing Colors and Background:

This example shows how to modify the text and background colors to create a visually distinct animation. rust use pardon_dance::{PardonDance, Config, Color};

fn main() -> Result<(), Box> { let config = Config { text_color: Color::new(255, 0, 0), // Red text background_color: Color::new(0, 0, 255), // Blue background ..Default::default() }; let dance = PardonDance::with_config("Colorful Dance!", config)?; dance.save_gif("colorful_dance.gif")?; Ok(()) }

4. Using a Different Font:

This example demonstrates how to use a custom font for the animation. Make sure the font file is accessible to your application. rust use pardon_dance::{PardonDance, Config};

fn main() -> Result<(), Box> { let config = Config { font_path: Some("path/to/your/font.ttf".to_string()), ..Default::default() }; let dance = PardonDance::with_config("Custom Font!", config)?; dance.save_gif("font_dance.gif")?; Ok(()) }

5. Specifying Output Path:

This example shows how to specify a custom path for the generated GIF file. rust use pardon_dance::PardonDance;

fn main() -> Result<(), Box> { let dance = PardonDance::new("Specific Location!")?; dance.save_gif("/tmp/output_dance.gif")?; Ok(()) }

Features

  • Simple API: Easy-to-use functions for generating pardon dance animations.
  • Customizable: Control animation speed, font size, colors, and fonts.
  • Cross-Platform: Works on various operating systems supported by Rust.
  • GIF Output: Generates animations in the widely compatible GIF format.
  • Configuration Options: Flexible Config struct for fine-grained control.

License

MIT

This crate is part of the pardon-dance ecosystem. For advanced features and enterprise-grade tools, visit: https://supermaker.ai/video/blog/unlocking-the-magic-of-pardon-dance-the-viral-video-effect-taking-over-social-media/

Commit count: 0

cargo fmt