Wanim
Wanim runs Manim (the Python animation engine behind 3Blue1Brown) in the browser by patching rapydscript-ng to transpile Manim code into JavaScript, paired with a companion JS library, yielding a bundle 20× smaller than Pyodide.
What it addresses
Running Manim in the browser with Pyodide is too heavy, making it impractical to embed interactive Manim animations in a blog.
Shared over time
Each entry reflects what was shared on that date. Details may have changed since then.
Wanim
Wanim runs Manim (the Python animation engine behind 3Blue1Brown) in the browser by patching rapydscript-ng to transpile Manim code into JavaScript, paired with a companion JS library, yielding a bundle 20× smaller than Pyodide.
Problem: Running Manim in the browser with Pyodide is too heavy, making it impractical to embed interactive Manim animations in a blog.
Audience: Personal use for building interactive Manim animations in the author's blog
Posted by @Acfboy · Original source ↗
Story title · @Acfboy · · Source ↗
Show HN: Wanim – Run Manim Python in the browser, 20× smaller than Pyodide
Submitted URL · @Acfboy · · Source ↗
https://github.com/Acfboy/Wanim
Source text · @Acfboy · · Source ↗
I love 3Blue1Brown's animations and Manim, the Python animation engine behind them. So I wanted to run it in my blog to build interactive animations. But that wasn't easy. Running it with Pyodide is too heavy.
Source text · @Acfboy · · Source ↗
by patching rapydscript-ng (a tool that transpiles Python-like syntax to JS), I make it translate Manim code into JS, and pair it with a companion JS library. This lets it run the original code in a small enough bundle.
Source text · @Acfboy · · Source ↗
You can see a blog I built here: https://wanim.org/blog
Source text · @Acfboy · · Source ↗
try running your own Manim animations at https://wanim.org/playground
Source text · @Acfboy · · Source ↗
I looked at publicly available Manim code and found it rarely needs other libraries or complex Python features beyond numpy, so I don't need Pyodide. I only have to transpile it and support numpy.
Wanim
A JavaScript library almost completely identical to Manim that runs original Manim Python code in the browser by patching rapydscript-ng to translate Python to JavaScript with numpy syntax support, at about 1M in size (1/20 of pyodide).
Problem: No existing project could run original Manim Python code in the browser without carrying the bulky pyodide, which made it impossible to embed.
Posted by @Acfboy · Original source ↗
Story title · @Acfboy · · Source ↗
Show HN: Wanim – Manim in the browser, but 1/20 smaller
Submitted URL · @Acfboy · · Source ↗
https://github.com/Acfboy/Wanim
Source text · @Acfboy · · Source ↗
You can try it at https://wanim.org/playground
Source text · @Acfboy · · Source ↗
there is an interactive courseware example at https://wanim.org/blog
Source text · @Acfboy · · Source ↗
My idea is to rewrite a js library that is almost completely identical to manim, and then patch rapydscript-ng to translate the original code to js, and support numpy syntax.
Source text · @Acfboy · · Source ↗
It looks surprisingly good, supports the vast majority of syntax, and the size is only about 1M (1/20 of pyodide)!
Source text · @Acfboy · · Source ↗
when I tried to use it to make interactive small demos on the web, I found that no project can simultaneously satisfy running original manim python code without carrying the bulky pyodide which makes it impossible to embed