# multi-phase-camera

multi-phase-camera — a rule for animated web scenes: the camera moves through 2-3 zoom phases (pull-back, focus, push) with continuous micro-drift on top. For when a single linear zoom feels mechanical.

- rule · `type=rule` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 78316 repo stars
- Author: calesthio
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/calesthio/OpenMontage/tree/HEAD/.agents/skills/hyperframes-animation/rules/multi-phase-camera.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/multi-phase-camera

## What it does

The rule lays out a camera wrapper around the whole scene: one div whose `transform: scale() translate(x, y)` is driven by a GSAP timeline. Instead of one linear move, the zoom is split into phases that fire at scripted times. The result is a rhythm of anticipation, reveal, settle.

Inside you get the scene HTML, CSS for `.scene` and `.camera`, and a ready GSAP timeline. Scale advances stepwise through a `phase` object, and a sine-based drift adds small translate offsets on X and Y. The drift is invisible frame to frame but keeps the shot alive between phases. The timeline is paused and registered in `window.__timelines` so frame seeks stay deterministic.

Values are chosen by hand: three phase scales, timings, drift amplitude. One constraint matters — if `PHASE_1_SCALE` sits below 1, `.scene` must have `overflow: hidden`, or content edges leak outside the frame. You need GSAP 3.14.2 from a CDN and a sense of how the camera phases line up with content reveal beats.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/multi-phase-camera.md` — The paths frontmatter field limits the files

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### Cursor

**Manually: put the files in place**
- File: `.cursor/rules/multi-phase-camera.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/multi-phase-camera.instructions.md` — The applyTo field sets which files it applies to

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/multi-phase-camera.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/multi-phase-camera.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/calesthio/OpenMontage/tree/HEAD/.agents/skills/hyperframes-animation/rules/multi-phase-camera.md

## When to use it
- Split camera zoom into 2-3 phases instead of one linear move
- Add continuous micro-drift so the camera never feels static
- Tune timings and easing for each phase
- Sequence content reveals inside the camera frame
- Get a deterministic timeline for frame-by-frame seeking

## Example prompts
- Build a scene using the multi-phase-camera rule: pull-back, focus, push
- Add camera drift with DRIFT_AMP_X 4 and DRIFT_CYCLES 2
- Set the phases so HERO_AT fires after the transition to PHASE_2_SCALE

## Similar
- [frost-sequence-camera-orbit](https://affpapa.org/en/nevibecode/skills/frost-sequence-camera-orbit.md) — skill · 13300 installs
- [camera-cinematography](https://affpapa.org/en/nevibecode/skills/camera-cinematography.md) — skill · 653 installs
- [extension-camera](https://affpapa.org/en/nevibecode/skills/extension-camera.md) — skill · 32200 installs
- [cinematic-camera](https://affpapa.org/en/nevibecode/skills/cinematic-camera.md) — skill · 2000 installs
- [3d-camera-flight](https://affpapa.org/en/nevibecode/rules/3d-camera-flight.md) — rule · ★ 328 repo stars
- [add-camera](https://affpapa.org/en/nevibecode/skills/add-camera.md) — skill · ★ 1167 repo stars

From the same set: [calesthio/openmontage](https://affpapa.org/en/nevibecode/by/calesthio/openmontage.md) — 101 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
