Snapshot của 3b1b/videos: 11.5k★ · Python. Code for the manim-generated scenes used in 3blue1brown videos
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
This project contains the code used to generate the explanatory math videos found on 3Blue1Brown.
This almost entirely consists of scenes generated using the library Manim. See also the community maintained version at ManimCommunity.
Older projects may have code dependent on older versions of manim, and so may not run out of the box here.
Note, while the library Manim itself is open source software and under the MIT license, the contents of this repository are available under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Workflow
I made this video to show more of how I use manim. Note that I'm using 3b1b/manim, not the community edition, some functionality may differ between the two. Aside from installing manim itself, replicating the workflow involves some custom plugins with Sublime, the text editor I use.
If you use another text editor, the same functionality can be mimicked. The key is to make use of two facts.
Running manimgl (file name) (scene name) -se (line_number) will drop you into an interactive mode at that line of the file, like a debugger, with an iPython terminal that can be used to interact with the scene.
Within that interactive mode, if you enter "checkpoint_paste()" to the terminal, it will run whatever bit of code is copied to the clipboard. Moreover, if that copied code begins with a comment, the first time it sees that comment it will save the state of the scene at that point, and for all future calls on code beginning with the same comment, it will first revert to that state of the scene before running the code.
The argument "skip" of checkpoint_paste will mean it runs the code without animating, as if all run times set to 0.
The argument "record" of checkpoint_paste will cause whatever animations are run with that copied code to be rendered to file.
For my own workflow, I set up some keyboard shortcuts to kick off each of these commands. For those who want to try it out themselves, here's what's involved.
Sublime-specific instructions
Install Terminus (via package control). This is a terminal run within sublime, and it lets us write some plugins that take the state in sublime, like where your cursor is, what's highlighted, etc., and use that to run a desired command line instruction.
Take the files in the "sublime_custom_commands" sub-directory of this repo, and copy them into the Packages/User/ directory of your Sublime Application. This should be a directory with a path that looks something like /wherever/your/sublime/lives/Packages/User/
Add some keybindings to reference these commands. Here's what I have inside my key_bindings file, you can find your own under the menu Sublime Text -> Settings -> Keybindings
For example, I bind the "command + shift + R" to a custom "manim_run_scene" command. If the cursor is inside a line of a scene, this will drop you into the interactive mode at that point of the scene. If the cursor is on the line defining the scene, it will copy to the clipboard the command needed to render that full scene to file.
I bind "command + R" to a "manim_checkpoint_paste" command, which will copy whatever bit of code is highlighted, and run "checkpoint_paste()" in the interactive terminal.
Of course, you could set these to whatever keyboard shortcuts you prefer.
Installation
Install manimgl from source since the latest version published is not up to date.
3b1b/videos có 11.5k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/3b1b/videos. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
3b1b/videos có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho 3b1b/videos. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
3b1b/videos còn đang phát triển không?
Commit gần nhất trên 3b1b/videos là 10 ngày trước (theo timestamp GitHub). Repo có 2.1k fork — một chỉ báo về mức độ quan tâm của cộng đồng.
3b1b/videos viết bằng ngôn ngữ gì?
3b1b/videos chủ yếu viết bằng Python. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc thêm về 3b1b/videos ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/3b1b/videos là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc videos có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về videos.