Manim v0.21.0 #4928
behackl
announced in
Announcements
Manim v0.21.0
#4928
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
See our rendered changelog.
What's Changed
Breaking Changes 🚨
Delegate color handling in
Codeto Pygments and document custom styles by @Helbronner in Delegate color handling inCodeto pygments and add instructions for creating custom styles #4816Codeno longer honors foreground color overrides passed throughparagraph_config={"color": ...}orCode.default_paragraph_config["color"];syntax and line-number colors now come from the selected Pygments
formatter_style. To customize them, pass a custom PygmentsStylesubclassthrough
formatter_styleand configure its token styles andline_number_color. Background colors can still be overridden withbackground_config={"fill_color": ...}; otherwise, the selected Pygmentsstyle provides the background. See the note in the documentation of
Codefor an explicit example.
Speed up Cairo renderer by 2.2x on animation-heavy scenes by @HamdiBarkous in Speed up Cairo renderer by 2.2x on animation-heavy scenes #4695
Cairo path construction now uses vectorized subpath splitting, and pixel-array
handling avoids redundant copies while producing pixel-identical output. This
changes
Camera.convert_pixel_array(): theconvert_from_floatsargument hasbeen removed, and the method now always converts floats to the camera's pixel
format. Omit the argument if it was previously
True; usenp.array(pixel_array)instead if relying on the old default copying behavior.Highlights 🌟
Introduce first-class support for rendering text and markup via Typst (optional dependency) by @behackl in Introduce first-class support for rendering text and markup via Typst (optional dependency) #4681
The new
TypstandTypstMathmobjects compile Typst markupand mathematical expressions directly to SVG without requiring a TeX
installation. They support label-based subgroup selection,
{{ ... }}expression grouping, and integration with existing label APIs. Install the
optional dependency with
pip install "manim[typst]".Hash NumPy arrays without JSON expansion by @dexhunter in perf(cache): hash NumPy arrays without JSON expansion #4883
NumPy arrays in scene cache keys are now represented by deterministic hashes
of their complete logical contents instead of sampled JSON data. This
prevents stale cache hits when visible image data changes and reduces hashing
CPU time by roughly 94–98% in representative benchmarks.
Add support for encoding partial movie files in parallel by @pjfo in Add support for encoding partial movie files in parallel #4899
The new
max_inflight_encodersconfiguration option allows partial movieencoding to overlap with rendering while bounding the number of encoder
workers. Try it with
manim render --max-inflight-encoders 4 --encoder-queue-size 8 scene.py Scene;--encoder-queue-sizelimits the pending frame buffers held by each encoder.The default of one in-flight encoder preserves serial behavior; higher values
reduced an encoding-heavy benchmark by 56% and larger real-world renders by
roughly 8–11%.
New Features ✨
Tableby @leqo-c in Allow excluding inner lines ofTable#4731TexTemplateby @Sazzzzzz in feat: support multiple TeX compilers inTexTemplate#4810dot_buffparameter toBulletedListby @GniLudio in Add dot_buff parameter to BulletedList #4892Enhancements 🚀
GenericGraph.__getitem__()by @HairlessVillager in Support edge lookup via tuple inGenericGraph.__getitem__()#3799Mobject.submobjectsin sequence methods by @nikolajmunk in perf: Mobject's Sequence methods no longer copy self.submobjects on every call #4915Bug Fixes 🐛
arrange_in_grid()andget_location()by @Croustit in Fix OpenGL crashes inarrange_in_grid()andget_location()#4622get_nth_subpath()from raisingIndexErrorand ensure it returns a NumPy array by @MqCreaple in FixIndexErroringet_nth_subpath()and ensure it always returns a NumPy array #4630put_start_and_end_on()by @GoThrones in Preserve closed curves input_start_and_end_on()#4658GrouporVGroupinCyclicReplaceandSwapby @irvanalhaq9 in AllowCyclicReplaceandSwapto accept singleGrouporVGroupand add example #4211languagewhen constructingCodefromcode_fileby @GniLudio in Uselanguageparameter to formatCodeeven when passingcode_file#4706ThreeDScene.set_to_default_angled_camera_orientation()raisingAttributeErrorby @siddhu-pikachu in Fixset_to_default_angled_camera_orientation()raisingAttributeError#4704manim init project --defaultby @aoxiangtianyu-go in fix(init): reverse default resolution when usingmanim init project --default#4839round_corners()failures for collinear vertices by @MeiSiristhebest in Preventround_corners()failures for collinear vertices #4906checkhealthfalse positives for uv launcher shims by @srinu2003 in fix(cli): resolve checkhealth false positive for uv launcher shims #4889Anglecrashes for parallel or collinear lines by @MeiSiristhebest in FixAnglecrash on parallel/collinear lines (#1930) #4907Codebaseline alignment inParagraphby @Croustit in fix: normalizeCodebaseline alignment inParagraph#4692MathTexhandle multiline strings by @henrikmidtiby in Let MathTex handle multiline strings #4634Codelines are no longer deleted whendisable_ligaturesisFalseby @nikolajmunk in Glyphs at end of Code lines no longer deleted when disable_ligatures is False #4926Documentation 📚
SquareToCircleterminology in the quickstart guide by @xuruidong in Fix incorrect terminology in quickstart docs #4631Spheredocumentation and add examples by @Jackyuanx in Fix wrong angle ranges inSpheredocumentation and add more examples #3973GenericGraph.__getitem__()by @mayank-dev-15 in Add docstring toGenericGraph.__getitem__()#4761FadeOutexample name by @GniLudio in Fix name of FadeOut example #4832Textby @SupernovaIa in docs(text): document whitespace-stripped indexing in Text #4866MovingDotsexample by @shenao010415 in Preserve line color in MovingDots example #4895register_font()by @ExploreMaths in docs: fix register_font docstring #4880cartesian_to_spherical()andspherical_to_cartesian()docstrings by @changsheng0804-blip in Fix misleading docstring in cartesian_to_spherical #4764MovingCameraSceneexample by @nikolajmunk in docs: Rename "scene" in MovingCameraScene example #4910Testing 🧪
VMobjectfixes by @THE-RAF in Add regression tests for four recent fixes in vectorized_mobject.py #4750GenericGraph.__getitem__()by @sridhar-3009 in Add tests for edge lookup inGenericGraph.__getitem__()#4753Infrastructure & Build 🔨
ci.ymlto fix failing pipelines #4679Code Quality & Refactoring 🧹
exceptinrate_functions.pyby @koteshyelamati in Fix bare except clause in manim/utils/rate_functions.py #4891Codesyntax-coloring implementation by @GniLudio in SimplifyCodesyntax-coloring implementation #4894TypstMathtoMathTypstto match existingTex/MathTexcoupling by @behackl in RenameTypstMathtoMathTypstto match existingTex/MathTexcoupling #4925Type Hints 📝
mobject.pyby @henrikmidtiby in Add type annotations tomobject.py#4388npt.NDArray[np.float64]forVMobject._bezier_t_valuesby @GoThrones in ChangeVMobject._bezier_t_valuestypehint tonpt.NDArray[np.float64]#4675Callableannotations for mobject updater utilities by @treszkai in More specific Callable type annotations in mobject_update_utils #4728transform_matching_parts.pyby @henrikmidtiby in Add type annotations totransform_matching_parts.py#4400_on_finishannotation inAnimation.__init__by @GniLudio in Fix type annotation of_on_finishinAnimation.__init__#4812table.pyby @henrikmidtiby in Add type annotations totable.py#4641Other Changes
v0.21.0by @behackl in Prepare new release:v0.21.0#4919New Contributors
arrange_in_grid()andget_location()#4622IndexErroringet_nth_subpath()and ensure it always returns a NumPy array #4630Table#4731GenericGraph.__getitem__()#4753languageparameter to formatCodeeven when passingcode_file#4706GenericGraph.__getitem__()#4761set_to_default_angled_camera_orientation()raisingAttributeError#4704TexTemplate#4810manim init project --default#4839round_corners()failures for collinear vertices #4906Codeto pygments and add instructions for creating custom styles #4816Full Changelog: Compare view
This discussion was created from the release Manim v0.21.0.
All reactions