# camera-cursor-tracking

The camera-cursor-tracking rule keeps a growing text element in view with a two-stage virtual camera. Use it for search fields, animated URLs, and similar scenes.

- 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/camera-cursor-tracking.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/camera-cursor-tracking

## What it does

The rule separates the full element from the visible viewport. During the first phase, the world stays at its starting offset while text is revealed. Once the focal point passes the chosen screen position, the world moves left so the cursor, highlight, or latest glyph remains anchored in view.

The implementation guidance covers HTML, CSS, and a paused GSAP timeline. Text reveal uses a `max-width` tween, camera motion uses a translated `.world`, and cursor blinking uses a finite GSAP yoyo sequence rather than a CSS keyframe. `VIEWPORT_PAD_LEFT` must match the `.viewport` padding, or the camera position calculation will drift.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/camera-cursor-tracking.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/camera-cursor-tracking.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

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

### Windsurf (Devin Desktop)

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

### Cline

**Manually: put the files in place**
- File: `.clinerules/camera-cursor-tracking.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/camera-cursor-tracking.md

## When to use it
- keep expanding text inside the viewport
- switch from a static camera to focal-point tracking
- pin a cursor or highlight to a screen position
- drive deterministic cursor blinking from GSAP

## Example prompts
- Apply the `camera-cursor-tracking` rule to a scene that reveals a search query over time.
- Build `tracking-scene` so tracking starts when the cursor crosses `CURSOR_TARGET_FRACTION`.
- Review the GSAP timeline and replace CSS cursor blinking with the finite timeline tween.

## 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
- [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
- [extension-camera](https://affpapa.org/en/nevibecode/skills/extension-camera.md) — skill · 32200 installs
- [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
