3d · coleam00 — Claude Code rule: what it does, how to install
3d enforces proper Three.js and React Three Fiber conventions for deterministic video rendering in Remotion.
no license ★ 849 updated 2026-01-24
.claude/rules/3d.mdWhat 3d does
This instruction set establishes boundaries for generating 3D assets in Remotion projects. It instructs the agent to encapsulate scenes inside <ThreeCanvas>, passing explicit frame dimensions alongside standard scene lighting.
Autonomous animations will ruin frame-by-frame exports. Because of that, the @react-three/fiber hook useFrame is strictly disallowed, requiring all transformations to read directly from useCurrentFrame(). Every <Sequence> nested inside the canvas must specify layout="none".
The project must have @remotion/three installed beforehand to render these components.
What it helps with
- stop frame flickering caused by unpinned 3D animations
- tie object rotations directly to Remotion frame counts
- configure
<ThreeCanvas>bounds and lights properly - reset sequence layouts when nesting components in 3D canvases
Example prompts for the agent
- Create a rotating 3D box inside Remotion using Three.js
- Animate a sphere material based on the current video frame
- Add a Sequence element inside my ThreeCanvas component
How to install 3d
Manually: put the files in place
.claude/rules/3d.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/3d.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/3d.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/3d.mdManually: put the files in place
.clinerules/3d.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about 3d
How to install 3d in Claude Code?
Place the rule contents into your repository at .claude/rules/3d.md.
Why does this rule ban useFrame?
Remotion captures frames sequentially, so runtime render loops cause unpredictable stuttering during video generation.
Which library must be present in the project?
You need @remotion/three, added via npx remotion add @remotion/three or your active package manager.
Similar IDE rules
All IDE rules for Game dev and 3D: Unity, Unreal, Godot, Blender →3d by other authors comes first.