Skip to content

Overview ​

manim-live turns standard Manim (Python) code into real-time animations in a web page: no server, no local Python. Two typical uses — an AI writes and plays animations on the fly while explaining, and embedding rendering anywhere in your own site.

Differences from native Manim ​

The code is the same standard Manim Python; the difference lies only in where it runs and how the picture is produced:

Native Manim (CLI)manim-live
The code you writeStandard Manim PythonThe same code, runs as-is
EnvironmentLocal install of Python + manim + ffmpeg (plus LaTeX for formulas)Just a browser, zero install
How you get the pictureOffline CLI render to an mp4; playback and embedding are left to youReal-time rendering in the page; the animation plays as soon as the code is submitted
Embedding in pages or productsNot possible; a video file can only be embedded after the factEmbed anywhere; all it takes is a container element
AI drawing while explainingA single render waits for the whole pipeline, so it cannot keep pace with the explanationWrite it, watch it; check() stops invalid code before rendering
Deployment costInstall the stack on every machine, or run a render serverOne npm package; assets can be self-hosted and it runs fully offline

The single trade-off: about 90% of the 437 public API entries are verified usable — the main scenarios (basic shapes, coordinate systems, text and formulas, animations, updaters, 3D) are fully covered; most of the 43 missing items are niche and every one has an alternative, listed item by item in Support Surface. In exchange: real-time rendering in the browser with zero environment.

Package shape ​

One npm package with a single entry factory, createManimRenderer(): give it a container element, get run(code) and dispose(). Zero framework dependencies — React, Vue, and vanilla JS differ only in mount timing. Third-party Python libraries (pandas, matplotlib, and others) are fetched automatically on demand, and the fetch URL can point at self-hosted assets for fully offline operation; see Third-Party Packages.

When to use it ​

Good fits: rendering model-generated animations in AI chat UIs (the package was built for this scenario); on-demand math animations in teaching pages and interactive notebooks; stopping invalid code before rendering with the check() dry run.

Poor fits: batch-rendering videos on a server (use manim CLI's native pipeline); all of Manim (this package covers a commonly used subset of Manim CE; the boundary is in the API Reference); non-Python animation needs.

Where to start ​

  • Install, the two external assets, browser requirements → Installation
  • Your first frame in about twenty lines → Quick Start
  • Type definitions and examples for every method, property, and hook → API Reference

MIT licensed · Manim 与 Pyodide 各依其自身许可(见「安装」)