Skip to main content
rule CX Codex

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

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/3d.md
Open on GitHub

What 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.md

The paths frontmatter field limits the files

Step 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.

From the same set33

The whole set →
get-video-dimensions get-video-dimensions — a Claude rule that hands the agent working Mediabunny code for reading a video's width and height, whether the file sits behind a URL, on disk, or in Remotion. CX Codex +1 ★ 849repo stars charts Guidelines for building Remotion charts and animated metrics without frame flickering. CX Codex +1 ★ 849repo stars lottie This rule covers loading and displaying Lottie animations in Remotion. Use it when a rendered video needs a Lottie asset. CX Codex +1 ★ 849repo stars import-srt-captions import-srt-captions — a Claude Code rule for importing .srt subtitle files into Remotion video projects. Uses parseSrt() from @remotion/captions to extract subtitles and integrate them into components. CX Codex +1 ★ 849repo stars parameters Explains how to add video parameterization using Zod schemas in Remotion compositions. Lets users edit parameters visually in the sidebar instead of hardcoding them. CX Codex +1 ★ 849repo stars sequencing sequencing — a rule for managing component timing in Remotion videos. Uses Sequence for delays and Series for sequential playback, with support for nested and overlapping scenes. CX Codex +1 ★ 849repo stars images images directs the AI to embed graphics in Remotion via the Img element, staticFile helper, and dimensions calculation. CX Codex +1 ★ 849repo stars calculate-metadata The calculate-metadata rule configures Remotion composition metadata before rendering, including duration, dimensions, FPS, props, and the output filename. CX Codex +1 ★ 849repo stars

Project sponsors

Companies that keep this analytics open