|
1 | | -# EfficientManim |
| 1 | +# 🌿 EfficientManim |
2 | 2 |
|
3 | | - |
| 3 | +<p align="center"> |
| 4 | + <img src="icon/icon.ico" alt="EfficientManim Icon" width="80"/> |
| 5 | +</p> |
4 | 6 |
|
5 | | -EfficientManim is a node-based visual IDE for building mathematical animations. It combines a drag-and-drop scene graph with AI-assisted tooling, a structured history system, and a learning-first explanation engine. |
| 7 | +<p align="center"> |
| 8 | + <a href="https://github.com/pro-grammer-SD/EfficientManim"><img src="https://img.shields.io/badge/Python-3.10+-3776ab?style=flat-square&logo=python&logoColor=white" alt="Python"/></a> |
| 9 | + <a href="https://www.manim.community/"><img src="https://img.shields.io/badge/Manim-Community-4caf50?style=flat-square" alt="Manim"/></a> |
| 10 | + <a href="https://github.com/pro-grammer-SD/EfficientManim/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-f59e0b?style=flat-square" alt="MIT License"/></a> |
| 11 | + <a href="https://www.reddit.com/r/manim/comments/1qck0ji/i_built_a_nodebased_manim_ide_with_ai_assistance/"><img src="https://img.shields.io/badge/Reddit-Discussion-ff4500?style=flat-square&logo=reddit&logoColor=white" alt="Reddit"/></a> |
| 12 | +</p> |
| 13 | + |
| 14 | +<p align="center"> |
| 15 | + <strong>A node-based visual IDE for mathematical animations — with AI tooling, a structured history system, and a built-in explanation engine for students and teachers.</strong> |
| 16 | +</p> |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +## ✨ What It Is |
| 21 | + |
| 22 | +EfficientManim turns [Manim](https://www.manim.community/) from a code-only tool into a visual, AI-augmented workspace. Wire Mobjects and animations together on an infinite canvas, generate scenes from plain English or PDF slides, and get structured explanations for every move — all without leaving the editor. |
6 | 23 |
|
7 | 24 | --- |
8 | 25 |
|
9 | | -## What You Can Do |
10 | | -- Build Manim scenes visually with nodes, wiring, and live previews. |
11 | | -- Generate animations from natural-language prompts or PDF slides. |
12 | | -- Produce AI voiceovers synced to animation timing. |
13 | | -- Inspect and control everything through MCP commands. |
| 26 | +## 🚀 Features |
| 27 | + |
| 28 | +### 🎬 Node-Based Visual Workflow |
| 29 | + |
| 30 | +Drag-and-drop Mobjects and Animations onto an **infinite canvas**, connect them with smart wires, and watch your scene graph come alive. Wire validation runs automatically, and live static previews update as you build. |
| 31 | + |
| 32 | +- **60+ Manim classes** across 8 categories (Geometry, Text, Graphs, 3D, Animations…), searchable in real time via the **Manim Class Browser** |
| 33 | +- **Multiple Scenes** per project — create, rename, delete, and switch between them in the Scenes tab; each scene carries its own node graph and auto-saves state on switch |
| 34 | +- **VGroup Utility** — select Mobject nodes → click **Create VGroup** → get auto-generated `VGroup(...)` code displayed in an expandable tree |
| 35 | +- **Recents Panel** — top-5 Mobjects and top-5 Animations tracked per session, persisted to `~/.efficientmanim/usage.json`; double-click to add instantly |
14 | 36 |
|
15 | 37 | --- |
16 | 38 |
|
17 | | -## 🧠 Explain This Animation |
18 | | -**What it does** |
19 | | -- Converts the current animation into a clear, student-friendly explanation. |
20 | | -- Works for full scenes, selected nodes, or single animations. |
| 39 | +### 🤖 AI Features |
21 | 40 |
|
22 | | -**How it helps** |
23 | | -- Students get intuitive explanations and step-by-step reasoning. |
24 | | -- Teachers can reuse explanations as lesson scripts. |
25 | | -- Beginners learn the “why” behind each visual move. |
| 41 | +#### Prompt → Manim |
| 42 | +Describe an animation in plain English. Get runnable Manim code. |
26 | 43 |
|
27 | | -**Explain Panel workflow** |
28 | | -- Open the panel with the **🧠 Explain** button in the main toolbar. |
29 | | -- Choose **Simple** or **Detailed** mode. |
30 | | -- Regenerate or copy the explanation instantly. |
| 44 | +#### 📄 PDF Slide Animation |
| 45 | +Upload one or more PDFs. The AI parses each slide, builds an animation plan, and produces both Manim code and a ready-to-edit node graph — turning a static lecture deck into a structured animated scene. |
31 | 46 |
|
32 | | -**Simple vs Detailed** |
33 | | -- **Simple**: short, intuition-first summaries. |
34 | | -- **Detailed**: full step breakdown with conceptual reasoning. |
| 47 | +#### 🎙️ AI Voiceover Studio |
| 48 | +TTS generation with multi-voice support and automatic duration syncing to animation timing. |
| 49 | + |
| 50 | +#### 🐙 GitHub Snippet Loader |
| 51 | +Clone any GitHub repo into `~/.efficientmanim/snippets/`, browse `.py` files, and double-click to load a snippet directly into the AI panel. All repos repopulate on startup automatically. |
35 | 52 |
|
36 | 53 | --- |
37 | 54 |
|
38 | | -## 🎓 Learning Mode |
39 | | -**What it is** |
40 | | -Learning Mode automatically generates micro-explanations while students build animations. |
| 55 | +### 🧠 Explain This Animation |
| 56 | + |
| 57 | +Select a scene, a group of nodes, or a single animation — then hit **🧠 Explain** in the main toolbar. The system produces a clear, student-friendly explanation of what the animation is doing and why. |
41 | 58 |
|
42 | | -**When it triggers** |
43 | | -- Adding axes, graphs, or equations |
44 | | -- Creating transformations |
45 | | -- Adding tangent/slope/area visuals |
46 | | -- Major structural changes |
47 | | -- Checkpoints or large batch additions |
| 59 | +| Mode | What You Get | |
| 60 | +|------|-------------| |
| 61 | +| **Simple** | Short, intuition-first summary | |
| 62 | +| **Detailed** | Full step breakdown with conceptual reasoning | |
48 | 63 |
|
49 | | -**Why it’s useful** |
50 | | -It turns the editor into a live tutor, explaining what just changed and why it matters. |
| 64 | +Copy or regenerate instantly from the Explain Panel. Explanations can also be triggered programmatically via MCP (`explain.scene`, `explain.selected_nodes`). |
51 | 65 |
|
52 | | -**Default state** |
53 | | -Learning Mode is **OFF** by default to avoid interruptions. |
| 66 | +--- |
| 67 | + |
| 68 | +### 🎓 Learning Mode |
| 69 | + |
| 70 | +Learning Mode watches what you build and fires micro-explanations as you go — turning the editor into a live tutor. |
54 | 71 |
|
55 | | -**How to enable** |
56 | | -Settings → **Learning Mode** → Enable Learning Mode. |
| 72 | +**Triggers automatically when you:** |
| 73 | +- Add axes, graphs, or equations |
| 74 | +- Apply transformations |
| 75 | +- Attach tangent lines, slopes, or area visuals |
| 76 | +- Hit a checkpoint or land a large batch addition |
| 77 | + |
| 78 | +**Default:** OFF (to keep the workspace quiet for experienced users). |
| 79 | +**Enable:** Settings → **Learning Mode** → Enable Learning Mode. |
57 | 80 |
|
58 | 81 | --- |
59 | 82 |
|
60 | | -## 👩🏫 Teacher Mode |
61 | | -**What it does** |
62 | | -Teacher Mode generates structured lesson notes from the current scene. |
| 83 | +### 👩🏫 Teacher Mode |
| 84 | + |
| 85 | +Generate a full structured lesson from the current scene in one click. |
63 | 86 |
|
64 | | -**What you get** |
| 87 | +**Output includes:** |
65 | 88 | - Concept explanation |
66 | 89 | - Visual explanation tied to the animation |
67 | 90 | - Step-by-step teaching script |
68 | 91 | - Student-friendly notes |
69 | 92 | - Key takeaways |
70 | 93 |
|
71 | | -**Export options** |
72 | | -- Markdown (`.md`) |
73 | | -- Plain text (`.txt`) |
74 | | -- Copy to clipboard |
| 94 | +**Export as:** Markdown (`.md`), plain text (`.txt`), or copy to clipboard. |
| 95 | +**Enable:** Settings → **Teacher Mode** → Enable Teacher Mode. |
| 96 | + |
| 97 | +--- |
| 98 | + |
| 99 | +### 🕰️ History-Powered Explanations |
| 100 | + |
| 101 | +The rewritten `HistoryManager` captures grouped atomic operations — AI merges, property edits, motion, wiring — with per-node undo/redo stacks and project/scene/node checkpoints. |
| 102 | + |
| 103 | +The explanation engine hooks directly into history: |
| 104 | +- **Explain a checkpoint state** — what did the scene look like at this moment? |
| 105 | +- **Explain a diff** — what changed between two checkpoints? |
| 106 | +- **Explain an undo/redo action** — in plain student language, not code |
75 | 107 |
|
76 | | -**How to enable** |
77 | | -Settings → **Teacher Mode** → Enable Teacher Mode. |
| 108 | +See `docs/history_system.md` for the full data model and checkpoint API. |
78 | 109 |
|
79 | 110 | --- |
80 | 111 |
|
81 | | -## 🕰 History-Powered Explanations |
82 | | -EfficientManim can explain how a scene evolved over time: |
83 | | -- Explain any checkpoint state |
84 | | -- Explain what changed between two checkpoints |
85 | | -- Explain undo/redo actions in student language |
| 112 | +### 🧭 MCP Command Interface |
86 | 113 |
|
87 | | -These explanations are powered by the same analysis engine as the Explain Panel. |
| 114 | +Every action in EfficientManim — node edits, wires, VGroups, scenes, rendering, assets, AI workflows, themes, keybindings, TTS, explanations, Learning Mode, Teacher Mode — is scriptable via structured JSON through the MCP command layer. |
| 115 | + |
| 116 | +```json |
| 117 | +// Example |
| 118 | +{ "command": "explain.scene", "mode": "detailed" } |
| 119 | +{ "command": "teacher_mode.generate_lesson", "export": "markdown" } |
| 120 | +{ "command": "history.restore_checkpoint", "id": "chk_42" } |
| 121 | +``` |
| 122 | + |
| 123 | +Full reference in `docs/mcp_commands.md`. |
88 | 124 |
|
89 | 125 | --- |
90 | 126 |
|
91 | | -## 🤖 MCP Command Support |
92 | | -The explanation system is fully scriptable: |
93 | | -- Trigger explanations programmatically (`explain.scene`, `explain.selected_nodes`) |
94 | | -- Control Learning Mode and Teacher Mode via MCP |
95 | | -- Generate lesson notes through `teacher_mode.generate_lesson` |
| 127 | +### 🎨 Workspace & Polish |
96 | 128 |
|
97 | | -See `docs/mcp_commands.md` for detailed request/response examples. |
| 129 | +| Feature | Detail | |
| 130 | +|---------|--------| |
| 131 | +| **Dark / Light Themes** | Full dark mode, QSS-based with a ColorToken system, toggled via `Ctrl+T` or Settings | |
| 132 | +| **Tooltips Everywhere** | Every button, panel, and action has a tooltip — the UI is self-explanatory | |
| 133 | +| **Editable Keybindings** | Help → Edit Keybindings… Double-click any shortcut to rebind; duplicate detection included | |
| 134 | +| **Editable Project Name** | Rename the `.efp` file from a textbox in the top-right corner — no file manager required | |
| 135 | +| **Portable `.efp` Format** | ZIP-based project bundle: nodes, wires, images, sounds, and video assets in one file | |
| 136 | +| **Professional Rendering** | Full scene export to MP4/WebM — up to 4K, 15–60 FPS, multiple quality presets | |
98 | 137 |
|
99 | 138 | --- |
100 | 139 |
|
101 | | -## Getting Started |
102 | | -Run the app: |
103 | | -```bash |
104 | | -python main.py |
105 | | -``` |
| 140 | +## ⌨️ Keyboard Shortcuts |
| 141 | + |
| 142 | +| Action | Shortcut | |
| 143 | +|--------|----------| |
| 144 | +| New Project | `Ctrl+N` | |
| 145 | +| Open Project | `Ctrl+O` | |
| 146 | +| Save Project | `Ctrl+S` | |
| 147 | +| Save As | `Ctrl+Shift+S` | |
| 148 | +| Exit | `Ctrl+Q` | |
| 149 | +| Undo | `Ctrl+Z` | |
| 150 | +| Redo | `Ctrl+Y` | |
| 151 | +| Delete Selected | `Del` | |
| 152 | +| Fit View | `Ctrl+0` | |
| 153 | +| Auto-Layout | `Ctrl+L` | |
| 154 | +| Export Code | `Ctrl+E` | |
| 155 | +| Copy Code | `Ctrl+Shift+C` | |
| 156 | +| Toggle Theme | `Ctrl+T` | |
| 157 | +| Edit Keybindings | `Ctrl+,` | |
| 158 | + |
| 159 | +All shortcuts are fully editable via **Help → Edit Keybindings…** |
| 160 | + |
| 161 | +--- |
| 162 | + |
| 163 | +## 🛠️ Prerequisites |
| 164 | + |
| 165 | +- **Python 3.10+** |
| 166 | +- **FFmpeg** — required for video rendering (must be in `PATH`) |
| 167 | +- **Git** — optional, for the GitHub Snippet Loader |
| 168 | +- **LaTeX** — optional, for local LaTeX rendering |
106 | 169 |
|
107 | 170 | --- |
108 | 171 |
|
109 | | -## Installation |
| 172 | +## 📦 Installation |
| 173 | + |
110 | 174 | ```bash |
111 | 175 | git clone https://github.com/pro-grammer-SD/EfficientManim.git |
112 | 176 | cd EfficientManim |
113 | 177 | pip install -r requirements.txt |
114 | 178 | python main.py |
115 | 179 | ``` |
116 | 180 |
|
117 | | -Manual install: |
| 181 | +**Manual install:** |
| 182 | + |
118 | 183 | ```bash |
119 | 184 | pip install manim PySide6 google-genai pydub requests numpy pdfplumber regex |
120 | 185 | ``` |
121 | 186 |
|
122 | 187 | --- |
123 | 188 |
|
124 | | -## Documentation |
125 | | -- `docs/explain_system.md` — Explain system architecture and extension guide |
126 | | -- `docs/history_system.md` — History model + history-powered explanations |
127 | | -- `docs/mcp_commands.md` — MCP command reference (including Explain, Learning, Teacher) |
| 189 | +## 📸 Gallery |
| 190 | + |
| 191 | +| | | |
| 192 | +|---|---| |
| 193 | +|  |  | |
| 194 | +| *Launch and initialize the workspace* | *A clean canvas ready for composition* | |
| 195 | +|  |  | |
| 196 | +| *Recents panel — jump back in fast* | *Manipulate nodes interactively* | |
| 197 | +|  |  | |
| 198 | +| *Real-time element search* | *GitHub snippets at your fingertips* | |
| 199 | +|  |  | |
| 200 | +| *Selecting a snippet from a cloned repo* | *Loading external code into the workspace* | |
| 201 | +|  |  | |
| 202 | +| *Instant preview for fast iteration* | *Final rendered output in the node canvas* | |
| 203 | + |
| 204 | +--- |
| 205 | + |
| 206 | +## 📚 Documentation |
| 207 | + |
| 208 | +| File | Contents | |
| 209 | +|------|----------| |
| 210 | +| `docs/explain_system.md` | Explain Panel architecture and extension guide | |
| 211 | +| `docs/history_system.md` | History data model, checkpoint API, and history-powered explanations | |
| 212 | +| `docs/mcp_commands.md` | Full MCP command reference — every command, payload, and sample response | |
| 213 | +| `docs/README.md` | Architectural overview, project structure, and design decisions | |
| 214 | + |
| 215 | +--- |
| 216 | + |
| 217 | +## 💬 Community |
| 218 | + |
| 219 | +Discuss the project on Reddit: [r/manim — I built a node-based Manim IDE with AI assistance](https://www.reddit.com/r/manim/comments/1qck0ji/i_built_a_nodebased_manim_ide_with_ai_assistance/) |
128 | 220 |
|
129 | 221 | --- |
130 | 222 |
|
131 | | -## License |
132 | | -MIT (see `LICENSE`). |
| 223 | +<p align="center">Made with ❤️💚💙 by Soumalya · <a href="https://github.com/pro-grammer-SD">@pro-grammer-SD</a></p> |
0 commit comments