camera — Claude Code rule: what it does, how to install
Reference rule for ManimGL CameraFrame controls. Helps write 2D pans, zoom sequences, and 3D view changes without syntax errors.
AGPL-3.0 ★ 78,316 updated 2026-10-24
.claude/rules/camera.mdWhat camera does
The rule guides code generation around ManimGL's self.camera.frame. Because the frame functions as a Mobject, it supports regular positioning helpers like shifts and scaling. The guide outlines 2D frame panning, dimension changes, and smooth object tracking through add_updater callbacks.
For spatial scenes, it documents 3D orientation setups using the reorient() helper alongside direct Euler angle adjustments. It also includes examples for continuous rotations and keeping 2D titles locked in screen space using fix_in_frame(). Since these methods rely entirely on the ManimGL framework, attempting to run them in Community Manim will fail.
What it helps with
- track a moving object with the camera using frame updaters
- switch 3D perspective to isometric or top-down views
- keep 2D interface labels steady while the 3D scene rotates
- animate camera zoom transitions across grouped mobjects
Example prompts for the agent
- Create a ManimGL scene where the camera rotates continuously around a sphere
- Add a 2D title locked with fix_in_frame while the frame reorients to isometric
- Show how to zoom in on a specific mobject using set_width and move_to
How to install camera
Manually: put the files in place
.claude/rules/camera.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/camera.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/camera.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/camera.mdManually: put the files in place
.clinerules/camera.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about camera
How to install the camera rule in Claude Code?
Place the rule file at .claude/rules/camera.md within your repository root.
What does the camera rule do?
It provides syntax patterns and examples for controlling ManimGL's CameraFrame in 2D and 3D scenes.
Which method fixes UI labels on screen during 3D rotations?
Call fix_in_frame() on the text or 2D mobject to keep it pinned to screen coordinates.