anim

A tiny manim-like animation library in Rust. The MVP renders a fn(t: f64) -> DrawList scene at 60 fps in the browser via WASM + Canvas2D.

The purity model

Every scene is a pure function of time. Nothing in anim-core or the scene layer holds mutable state; the harness drives t, calls scene(t), and hands the returned DrawList to the renderer.

This purity is load-bearing:

  • Hot reload — reload the wasm module and re-drive from any t; the picture is identical.
  • Scrubbing — the scrub bar under every demo below is just calling set_time(t) and re-drawing. Time is not simulated forward; the scene is a lookup.
  • Testingscene(t) is a plain function; write ordinary unit tests.

The flagship demo

The arc-length reparameterization is the demo that most sharply shows what this library is about — see ArcLen.

Layering

anim-web  →  scenes / anim-examples  →  anim-core

anim-core has zero third-party dependencies. Only the web crate touches wasm-bindgen / web-sys.