Chuyển đến nội dung
Skillpedia
Lập trình chung75k · #2674

manimgl-best-practices

Skill này làm gì

Skill này giúp lập trình viên viết code hoạt hình ManimGL, tức phiên bản Manim dùng OpenGL. Nó dành cho lập trình viên muốn có hoạt hình toán học tương tác, chất lượng cao bằng Python.

Khi nào nên dùng

  • ✓Khi bạn viết code với thư viện ManimGL.
  • ✓Khi bạn muốn dùng các công cụ cảnh tương tác trong ManimGL.
  • ✓Khi bạn cần làm hoạt hình cho toán, đối tượng 3D hoặc chuyển động camera với ManimGL.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/calesthio/OpenMontage/blob/main/.agents/skills/manimgl-best-practices/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Viết một cảnh ManimGL với camera tương tác xoay quanh một bề mặt 3D.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill đưa ra quy tắc và ví dụ về cảnh tương tác, hình khối, hoạt hình, văn bản LaTeX, màu sắc, kiểu dáng và điều khiển camera, để agent của bạn viết được code ManimGL.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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
Câu hỏi thường gặp

ManimGL khác Manim Community thế nào?

ManimGL là phiên bản OpenGL được 3Blue1Brown dùng và có các tính năng phát triển tương tác.

Có bao quát chuyển động camera 3D không?

Có. Skill bao quát đối tượng 3D và điều khiển camera, kể cả góc Euler.

Có bao quát văn bản và toán không?

Có. Skill bao quát LaTeX với Tex, văn bản thường và tô màu bằng bảng màu.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
75k
Vị trí xếp hạng
#2674
Giấy phép
AGPL-3.0
Cập nhật
28/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự