depth-scatter-assemble — Claude Code rule: 3D depth-cloud assembly
depth-scatter-assemble — a rule for scenes where glyphs, cards or logo pieces arrive out of a turning 3D cloud and land in a flat layout. The reverse also works.
AGPL-3.0 ★ 78,316 updated 2026-10-24
.claude/rules/depth-scatter-assemble.mdWhat depth-scatter-assemble does
This rule for Claude Code and Codex lays out a scene in which a set of items flies in from a spinning depth-cloud and locks into a flat arrangement. Run the timeline backwards and the layout bursts back into depth. Every start point is trig on the element's index with the golden angle, so frames repeat exactly and nothing relies on Math.random.
The file ships scene markup, CSS and a paused GSAP timeline stored in window.__timelines. Resting coordinates come from data-target-x and data-target-y on each fragment; the scattered state is parked with gsap.set before any tween fires, and a separate stage tween keeps the cloud turning. A single 0→1 progress value drives every channel at once. There is a tumble-swap variation for handing off between two phrases, with no blank frame in between.
CSS carries the effect: leave out perspective on the stage, or transform-style: preserve-3d on the pieces, and the depth reads as a plain scale change. GSAP loads from a CDN script, 3.14.2 in the sample.
What it helps with
- assemble a logo from pieces flying in from depth
- hand off between two kinetic-type phrases with no empty frame
- lay cards into a grid out of a 3D cloud
- scatter elements without random values so frames repeat
Example prompts for the agent
- Build a GSAP scene where five glyphs fly out of a spinning 3D cloud into one row; derive the scatter from each element's index and read the end positions from
data-target-x/data-target-y. - Switch the phrase change in the kinetic type to tumble-swap: old glyphs leave into the cloud, new ones come out.
- Check the scene CSS for
perspectiveon the container andtransform-style: preserve-3don every fragment, otherwise the depth collapses.
How to install depth-scatter-assemble
Manually: put the files in place
.claude/rules/depth-scatter-assemble.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/depth-scatter-assemble.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/depth-scatter-assemble.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/depth-scatter-assemble.mdManually: put the files in place
.clinerules/depth-scatter-assemble.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about depth-scatter-assemble
How to install depth-scatter-assemble in Claude Code?
Place the rule file at .claude/rules/depth-scatter-assemble.md inside your project.
What does depth-scatter-assemble do?
It describes a scene where elements fly out of a turning 3D cloud into a flat layout, or scatter back into it. Start offsets are computed from each element's index, so frames repeat.
What does the effect need to work?
perspective on the stage plus transform-style: preserve-3d on the stage and every fragment, with GSAP loaded. Without them the depth reads as a 2D scale.