跳到正文
Skillpedia
通用编程75k · #2674

manimgl-best-practices

它能做什么

这项技能帮助开发者编写 ManimGL 动画代码。ManimGL 是 Manim 的 OpenGL 版本。适合想用 Python 制作高质量、可交互数学动画的程序员。

适用场景

  • ✓当你在用 ManimGL 库编写代码时。
  • ✓当你想使用 ManimGL 中的交互式场景工具时。
  • ✓当你需要用 ManimGL 为数学内容、三维对象或摄像机运动制作动画时。

技能链接

https://github.com/calesthio/OpenMontage/blob/main/.agents/skills/manimgl-best-practices/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/calesthio/OpenMontage/blob/main/.agents/skills/manimgl-best-practices/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我编写一个 ManimGL 场景,让交互式摄像机绕着一个三维曲面旋转。”

每周 5 个新技能,1 分钟读完。

工作原理

这项技能提供交互式场景、图形、动画、LaTeX 文字、颜色、样式和摄像机控制方面的规则与示例,让你的智能体能够编写 ManimGL 代码。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

How to use

Read individual rule files for detailed explanations and code examples:

Core Concepts

Creation & Transformation

Text & Math

  • rules/tex.md - Tex class, raw strings R"...", and LaTeX rendering
  • rules/text.md - Text mobjects, fonts, and styling
  • rules/t2c.md - tex_to_color_map (t2c) for coloring math expressions

Styling & Appearance

3D & Camera

  • rules/3d.md - 3D objects, surfaces, Sphere, Torus, parametric surfaces, lighting
  • rules/camera.md - frame.reorient(), Euler angles, fix_in_frame(), camera animations

Interactive Development

Configuration & CLI

  • rules/cli.md - manimgl command, flags (-w, -o, -se, -l, -h), rendering options
  • rules/config.md - custom_config.yml, directories, camera settings, quality presets

Working Examples

Complete, tested example files demonstrating common patterns:

Scene Templates

Copy and modify these templates to start new projects:

Quick Reference

Basic Scene Structure

from manimlib import *

class MyScene(InteractiveScene):
    def construct(self):
        # Create mobjects
        circle = Circle()

        # Add to scene (static)
        self.add(circle)

        # Or animate
        self.play(ShowCreation(circle))  # Note: ShowCreation, not Create

        # Wait
        self.wait(1)

Render Command

# Render and preview
manimgl scene.py MyScene

# Interactive mode - drop into shell at line 15
manimgl scene.py MyScene -se 15

# Write to file
manimgl scene.py MyScene -w

# Low quality for testing
manimgl scene.py MyScene -l

Key Differences from ManimCE

Feature ManimGL (3b1b) Manim Community
Import from manimlib import * from manim import *
CLI manimgl manim
Math text Tex(R"\pi") MathTex(r"\pi")
Scene InteractiveScene Scene
Create anim ShowCreation Create
Camera self.frame self.camera.frame
Fix in frame mob.fix_in_frame() self.add_fixed_in_frame_mobjects(mob)
Package manimgl (PyPI) manim (PyPI)

Interactive Development Workflow

ManimGL's killer feature is interactive development:

# Start at line 20 with state preserved
manimgl scene.py MyScene -se 20

In interactive mode:

# Copy code to clipboard, then run:
checkpoint_paste()           # Run with animations
checkpoint_paste(skip
常见问题

ManimGL 与 Manim Community 有何不同?

ManimGL 是 3Blue1Brown 使用的 OpenGL 版本,具有交互式开发功能。

它涵盖三维摄像机运动吗?

涵盖。它涵盖三维对象和摄像机控制,包括欧拉角。

它涵盖文字和数学公式吗?

涵盖。它涵盖使用 Tex 的 LaTeX,也涵盖普通文字,以及通过颜色映射进行上色。

详情

作者的原始描述

Trigger when: (1) User mentions "manimgl" or "ManimGL" or "3b1b manim", (2) Code contains `from manimlib import *`, (3) User runs `manimgl` CLI commands, (4) Working with InteractiveScene, self.frame, self.embed(), ShowCreation(), or ManimGL-specific patterns. Best practices for ManimGL (Grant Sanderson's 3Blue1Brown version) - OpenGL-based animation engine with interactive development. Covers InteractiveScene, Tex with t2c, camera frame control, interactive mode (-se flag), 3D rendering, and checkpoint_paste() workflow. NOT for Manim Community Edition (which uses `manim` imports and `manim` C

repo: calesthio/OpenMontage

热度

GitHub 星标
75k
排名
#2674
许可证
AGPL-3.0
更新时间
2026/10/28

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能