{"by":"maloyan","descendants":25,"id":47155375,"kids":[47191043,47191142,47192961,47194811,47192895,47191370,47192496,47190877,47216681,47190638,47190479,47190466,47190469,47191092],"score":140,"text":"Hi HN, I&#x27;m Narek. I built Manim-Web, a TypeScript&#x2F;JavaScript port of 3Blue1Brown’s popular Manim math animation engine.<p>The Problem: Like many here, I love Manim&#x27;s visual style. But setting it up locally is notoriously painful - it requires Python, FFmpeg, Cairo, and a full LaTeX distribution. It creates a massive barrier to entry, especially for students or people who just want to quickly visualize a concept.<p>The Solution: I wanted to make it zero-setup, so I ported the engine to TypeScript. Manim-Web runs entirely client-side in the browser. No Python, no servers, no install. It runs animations in real-time at 60fps.<p>How it works underneath:\n- Rendering: Uses Canvas API &#x2F; WebGL (via Three.js for 3D scenes).\n- LaTeX: Rendered and animated via MathJax&#x2F;KaTeX (no LaTeX install needed!).\n- API: I kept the API almost identical to the Python version (e.g., scene.play(new Transform(square, circle))), meaning existing Manim knowledge transfers over directly.\n- Reactivity: Updaters and ValueTrackers follow the exact same reactive pattern as the Python original.<p>Because it&#x27;s web-native, the animations are now inherently interactive (objects can be draggable&#x2F;clickable) and can be embedded directly into React&#x2F;Vue apps, interactive textbooks, or blogs. I also included a py2ts converter to help migrate existing scripts.<p>Live Demo: <a href=\"https:&#x2F;&#x2F;maloyan.github.io&#x2F;manim-web&#x2F;examples\" rel=\"nofollow\">https:&#x2F;&#x2F;maloyan.github.io&#x2F;manim-web&#x2F;examples</a>\nGitHub: <a href=\"https:&#x2F;&#x2F;github.com&#x2F;maloyan&#x2F;manim-web\" rel=\"nofollow\">https:&#x2F;&#x2F;github.com&#x2F;maloyan&#x2F;manim-web</a><p>It&#x27;s open-source (MIT). I&#x27;m still actively building out feature parity with the Python version, but core animations, geometry, plotting, and 3D orbiting are working great. I would love to hear your feedback, and I&#x27;ll be hanging around to answer any technical questions about rendering math in the browser!","time":1772043307,"title":"Show HN: I ported Manim to TypeScript (run 3b1B math animations in the browser)","type":"story","url":"https://github.com/maloyan/manim-web"}