# sine-wave-loop

sine-wave-loop — a GSAP rule that gives a settled scene element light jitter, or one bounded breathing loop, driven by Math.sin once its entry animation ends.

- 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/sine-wave-loop.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/sine-wave-loop

## What it does

The rule teaches the agent to keep a held element from looking frozen in an HTML and GSAP scene. One long tween moves a `phase` value from 0 to 2π, and each `onUpdate` turns it into a small `Math.sin` offset for `scale` or `translateY`. Since sin(0) is 0, the idle begins exactly where the entry animation stopped, so nothing jumps.

The file holds a scene template with a headline and an accent dot that pulses out of phase with it, built on GSAP loaded from CDN as `gsap@3.14.2`. Variants layer a second, faster frequency on top or fade the amplitude to zero over the last 20% of the idle, which the rule recommends once idle runs past 6 s. Values like `SCALE_AMP` and `IDLE_DUR` are placeholders you fill in.

The rule itself says to reach for it last. Reveal lines as the voiceover gets to them first, then try light jitter. A full breathing loop is meant for a single hero element, so don't let the agent put it on every headline.

## Install

### Claude Code (native platform)

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

### GitHub Copilot

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

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/sine-wave-loop.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/sine-wave-loop.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/sine-wave-loop.md

## When to use it
- Keep a settled headline from looking frozen with light jitter
- Move from an entry animation into idle with no visible jump
- Pulse an accent dot out of phase with the headline
- Fade idle motion to rest before a scene transition
- Fit a set number of sine cycles into a given idle length

## Example prompts
- Apply the sine-wave-loop rule: add subtle jitter to the headline after its entry animation.
- Use sine-wave-loop to give the hero one bounded breathing loop, with the amplitude fading out over the last 20% of idle.
- Make the accent dot pulse out of phase with the headline, following the sine-wave-loop rule.

## Similar
- [web-wave-designer](https://affpapa.org/en/nevibecode/skills/web-wave-designer.md) — skill · 214 installs
- [gsap-scrolltrigger](https://affpapa.org/en/nevibecode/skills/gsap-scrolltrigger.md) — skill · 87300 installs
- [gsap-timeline](https://affpapa.org/en/nevibecode/skills/gsap-timeline.md) — skill · 83900 installs
- [frost-sequence-camera-orbit](https://affpapa.org/en/nevibecode/skills/frost-sequence-camera-orbit.md) — skill · 13300 installs
- [canopy-part-title](https://affpapa.org/en/nevibecode/skills/canopy-part-title.md) — skill · 13200 installs
- [logo-animation](https://affpapa.org/en/nevibecode/skills/logo-animation.md) — skill · 5800 installs

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
