Skip to content

Repository files navigation

MotionGfx

License Crates.io Downloads Docs CI Discord

MotionGfx is a backend-agnostic motion graphics creation framework for Rust. Free and open-source forever.

Ten bars grow upward one after another, then play back in reverse.

Features

  • Backend agnostic: MotionGfx describes what changes and leaves drawing to the backend.
  • Just code: Scenes are plain Rust, built with loops, functions and variables.
  • Relative actions: Each action starts from the field's current value, so steps chain naturally.
  • Two-way playback: Play at any speed, in either direction, or jump to any frame without re-simulating.
  • Batteries included: Common easing and interpolation functions are built in.

Example

// Move a ball up, then back down.
let track = [
    b.act(ball, path!(Ball.y), |_| 30.0)
        .with_ease(ease::quad::ease_out)
        .play(ms(600)),
    b.act(ball, path!(Ball.y), |_| 140.0)
        .with_ease(ease::quad::ease_in)
        .play(ms(600)),
]
.ord_chain()
.compile();

A ball rises with an ease-out, then falls with an ease-in.

Where Next

Inspirations and Similar Projects

License

motiongfx is dual-licensed under either:

This means you can select the license you prefer! This dual-licensing approach is the de-facto standard in the Rust ecosystem and there are very good reasons to include both.

About

Backend agnostic motion graphics creation framework.

Topics

Resources

Stars

391 stars

Watchers

4 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages