Skip to content

💫 ManimGL with interactive previewing in VSCode. v1.0.0 is now available ✨

License

Notifications You must be signed in to change notification settings

Manim-Notebook/manim-notebook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Manim Notebook Logo showing a physical notebook with an 'M' letter on its title page

Manim Notebook

VSCode extension to interactively preview your Manim animations


Warning

This extension is for 3b1b's Manim library and NOT the Manim Community Edition (Manim CE).

Manim.Notebook.mp4

🎈 What is this?

Manim Notebook is a VSCode extension tailored to your needs when writing Python code to animate mathematical concepts with 3Blue1Brown's Manim library. It's NOT a Jupyter Notebook; instead it enriches your existing Python files with interactive Manim cells that let you live-preview parts of the code and instantly see the animations.

Originally, the motivation for this extension was Grant Sanderson's video How I animate 3Blue1Brown where he shows his Manim workflow in Sublime Text. This extension brings a similar workflow to VSCode but even goes further and provides a rich VSCode integration.

💻 Usage

Our VSCode walkthrough will guide you through the first steps and provide a sample file. The walkthrough should open automatically upon installation of the Manim Notebook extension. If not, you can invoke it manually: open the command palette (Ctrl/Cmd + Shift + P) and search for Manim Notebook: Open Walkthrough.

The main concept is that of a Manim Cell, which is just a regular Python comment, but one that starts with ## instead of #.

manim-cell-preview

Tip

For customization options, troubleshooting tips and a lot more, check out the Wiki.


🚀 Features

  • Manim Cells. Split your code into Manim Cells that start with ##. You will be presented with a CodeLens to preview the animation (and you can even reload your changed Python files such that you don't have to restart the preview).
  • Preview any code. Simple as that, select any code and preview it. No manual copy-pasting needed.
  • With or without Terminal. The extension parses the manimgl terminal output to provide rich VSCode integrations and makes possible an almost terminal-free workflow.
    • Shows the progress of the live Manim preview as VSCode progress bar.
    • Takes a user-defined delay into account, e.g. to wait for custom shell startup scripts (like venv activation).
    • State management: keeps track of the ManimGL state to react accordingly in different situations, e.g. prevent from running multiple statements at the same time.
  • Video export. Export your animations to a video file. A small wizard will guide you through the most important settings.
  • And more... Find all commands in the command palette (Ctrl/Cmd + Shift + P) by searching for > Manim Notebook. E.g. another command lets you clear() the window. Yet with another one you can start the scene at your cursor.
In the long run, we aim to even provide a Debugger for Manim code such that you can step through your animations and run until breakpoints. This would be a huge step forward in the Manim development workflow. For now, the Manim Cells that we provide are a start towards a more interactive experience.

Manim Notebook Logo with a fancy color-gradient background

About

💫 ManimGL with interactive previewing in VSCode. v1.0.0 is now available ✨

Resources

License

Stars

Watchers

Forks