manimgl-best-practices

Guides creation of mathematical animations using ManimGL, the 3Blue1Brown OpenGL animation engine.

Updated Jul 16, 2026
One-click install
npx skills add https://github.com/X-manist/Cohmira --skill manimgl-best-practices-x-manist
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: manimgl-best-practices
Source: https://github.com/X-manist/Cohmira/tree/main/src/builtin-plugins/openmontage/.agents/skills/manimgl-best-practices
Command: npx skills add https://github.com/X-manist/Cohmira --skill manimgl-best-practices-x-manist

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires manimgl, numpy, and includes references (resource) components.

What problem does it solve? Writing animations with ManimGL (Grant Sanderson's 3Blue1Brown engine) is error-prone because it differs significantly from Manim Community Edition in imports, CLI commands, class names, and camera APIs, and its interactive development workflow is poorly documented. ## Core Features & Use Cases - ManimGL-specific guidance: Covers InteractiveScene, ShowCreation, Tex with t2c color mapping, self.frame camera control, and fix_in_frame(), with a clear comparison table against Manim Community Edition. - Interactive development workflow: Explains the -se flag, checkpoint_paste(), and self.embed() for IPython-based iterative animation development. - 3D and camera control: Documents frame.reorient(), parametric surfaces, textured spheres, lighting, and 3D axes. - Use Case: A user asks to animate a transformer attention mechanism visualization; the skill provides working examples like attention pattern grids, softmax masking, and embedding vectors adapted from 3Blue1Brown's video code. ## Quick Start Ask the AI to create a ManimGL scene that animates a mathematical equation with colored terms using Tex and t2c, then render it with the manimgl CLI.

Frequently Asked Questions about manimgl-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a basic animation scene in ManimGL?

Create a class inheriting from InteractiveScene, define a construct() method, and use self.play() with animations like ShowCreation or Write. Import everything with 'from manimlib import *' and render with 'manimgl scene.py MyScene'.

What is the difference between ManimGL and Manim Community Edition?

ManimGL uses 'from manimlib import *', the manimgl CLI, ShowCreation instead of Create, Tex instead of MathTex, and self.frame instead of self.camera.frame. ManimGL also supports interactive development via the -se flag, which ManimCE lacks.

How do I use interactive mode in ManimGL for debugging?

Run 'manimgl scene.py MyScene -se 20' to start execution at line 20 with state preserved, dropping into an IPython shell. Inside, use checkpoint_paste() to run clipboard code with animations, or self.embed() in the scene to pause at a specific point.

How do I color specific parts of a LaTeX equation in ManimGL?

Use the Tex class with the t2c parameter, for example Tex(R"E = mc^2", t2c={"E": BLUE, "m": GREEN}). You can also call set_color_by_tex("n", BLUE) on a Tex mobject to color matching substrings after creation.

How do I control the 3D camera in ManimGL?

Access the camera via self.frame and call frame.reorient(theta, phi) to set orientation in degrees. Animate movement with self.play(frame.animate.reorient(60, -45)), and use fix_in_frame() on labels so they stay in screen space during rotation.

Why does my Manim code fail with ShowCreation or Create errors?

This happens when mixing ManimGL and Manim Community Edition APIs. ManimGL uses ShowCreation while ManimCE uses Create; verify your import is 'from manimlib import *' and your CLI command is manimgl, not manim.