
About
libanim (animl) is a Rust-based animation library that provides a declarative DSL for creating high-quality videos programmatically. It compiles to MP4 output and supports shapes, animations, and complex scene composition.
Features
- Declarative DSL for animation composition
- Shape primitives: rectangles, circles, custom paths
- Transformations: morphing, scaling, rotation
- Keyframe-based animations
- Custom GLSL shaders support
- MP4 output with configurable quality (CRF)
- Parametric curves and mathematical visualizations
Example
use animl_core::prelude::*;
use animl_macros::scene;
#[scene(1920x1080, 30fps, crf=23, output="hello.mp4")]
fn hello_world(scene: &mut Scene) {
let rect = rect!(scene, size = (1.0, 1.0), color = hex!(0xFF4D4D));
let circle = circle!(scene, r = 0.5, color = hex!(0x4DFF4D));
play!(scene, circle.morph_to(rect), 1.5);
}Tech Stack
Built with Rust, using custom DSL macros, GLSL shaders, and FFmpeg for video encoding.
★ 2 Stars30 CommitsMIT License