Communitygithub.com

zroeschen/Video-Production-Factory

HyperFrames向けGSAPアニメーションリファレンス。gsap.to()、from()、fromTo()、イージング、スタガー、デフォルト値、タイムライン(gsap.timeline()、位置パラメータ、ラベル、ネスト、再生制御)、パフォーマンス(transform、will-change、quickTo)を網羅。HyperFramesコンポジションでGSAPアニメーションを記述する際に使用します。

Video-Production-Factory とは?

このスキルは、HyperFramesコンポジション内でGSAPアニメーションを記述するための包括的なリファレンスです。GSAPのコアなトゥイーンメソッド(gsap.to()、gsap.from()、gsap.fromTo())、イージング、スタガー、デフォルト値、タイムラインの高度な使い方(位置パラメータ、ラベル、ネスト、再生制御)をカバーしています。また、パフォーマンス最適化のベストプラクティスとして、transformやopacityの優先、will-changeの適切な使用、gsap.quickTo()による頻繁な更新の効率化についても解説しています。このスキルは、HyperFrames向けのアニメーションを作成する際に、正確で効率的なGSAPコードを記述するためのガイドとして機能します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/zroeschen/Video-Production-Factory/tree/HEAD/.agents/skills/gsap

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

GSAP

コアトゥイーンメソッド

  • gsap.to(targets, vars) — 現在の状態から vars へアニメーション。最も一般的。
  • gsap.from(targets, vars) — vars から現在の状態へアニメーション(登場時)。
  • gsap.fromTo(targets, fromVars, toVars) — 明示的な開始と終了を指定。
  • gsap.set(targets, vars) — 即座に適用(duration 0)。

常に camelCase のプロパティ名を使用してください(例: backgroundColor、rotationX)。

一般的な vars

  • duration — 秒(デフォルト 0.5)。
  • delay — 開始までの秒数。
  • ease — "power1.out"(デフォルト)、"power3.inOut"、"back.out(1.7)"、"elastic.out(1, 0.3)"、"none"。
  • stagger — 数値 0.1 またはオブジェクト: { amount: 0.3, from: "center" }、{ each: 0.1, from: "random" }。
  • overwrite — false(デフォルト)、true、または "auto"。
  • repeat — 数値または -1(無限)。yoyo — repeat と併用して方向を反転。
  • onComplete、onStart、onUpdate — コールバック。
  • immediateRender — from()/fromTo() ではデフォルト true。同じプロパティと要素を後からトゥイーンする場合は false に設定して上書きを防ぎます。

トランスフォームとCSS

生の transform 文字列よりも GSAP の トランスフォームエイリアス を推奨:

GSAP プロパティ同等
x、y、ztranslateX/Y/Z (px)
xPercent、yPercenttranslateX/Y (%)
scale、scaleX、scaleYscale
rotationrotate (deg)
rotationX、rotationY3D rotate
skewX、skewYskew
transformOrigintransform-origin
  • autoAlpha — opacity より推奨。0 の時は visibility: hidden も設定。
  • CSS 変数 — "--hue": 180。
  • svgOrigin (SVG のみ) — SVG グローバル座標空間の原点。transformOrigin と併用しないでください。
  • Directional rotation — "360_cw"、"-170_short"、"90_ccw"。
  • clearProps — "all" またはカンマ区切り。完了時にインラインスタイルを削除。
  • 相対値 — "+=20"、"-=10"、"*=2"。

関数ベースの値

gsap.to(".item", {
  x: (i, target, targets) => i * 50,
  stagger: 0.1,
});

イージング

組み込みイージング: power1–power4、back、bounce、circ、elastic、expo、sine。それぞれに .in、.out、.inOut があります。

デフォルト

gsap.defaults({ duration: 0.6, ease: "power2.out" });

トゥイーンの制御

const tween = gsap.to(".box", { x: 100 });
tween.pause();
tween.play();
tween.reverse();
tween.kill();
tween.progress(0.5);
tween.time(0.2);

gsap.matchMedia()(レスポンシブ + アクセシビリティ)

メディアクエリに一致する場合のみセットアップを実行し、一致しなくなったら自動的に元に戻します。

let mm = gsap.matchMedia();
mm.add(
  {
    isDesktop: "(min-width: 800px)",
    reduceMotion: "(prefers-reduced-motion: reduce)",
  },
  (context) => {
    const { isDesktop, reduceMotion } = context.conditions;
    gsap.to(".box", {
      rotation: isDesktop ? 360 : 180,
      duration: reduceMotion ? 0 : 2,
    });
  },
);

タイムライン

タイムラインの作成

const tl = gsap.timeline({ defaults: { duration: 0.5, ease: "power2.out" } });
tl.to(".a", { x: 100 }).to(".b", { y: 50 }).to(".c", { opacity: 0 });

位置パラメータ

3番目の引数で配置を制御:

  • 絶対: 1 — 1秒の位置
  • 相対: "+=0.5" — 終了後; "-=0.2" — 終了前
  • ラベル: "intro"、"intro+=0.3"
  • 整列: "<" — 前と同じ開始; ">" — 前の終了後; "<0.2" — 前の開始から0.2秒後
tl.to(".a", { x: 100 }, 0);
tl.to(".b", { y: 50 }, "<"); // .a と同じ開始
tl.to(".c", { opacity: 0 }, "<0.2"); // .b 開始の0.2秒後

ラベル

tl.addLabel("intro", 0);
tl.to(".a", { x: 100 }, "intro");
tl.addLabel("outro", "+=0.5");
tl.play("outro");
tl.tweenFromTo("intro", "outro");

タイムラインオプション

  • paused: true — 一時停止状態で作成; .play() で開始。
  • repeat、yoyo — タイムライン全体に適用。
  • defaults — すべての子トゥイーンにマージされる変数。

タイムラインのネスト

const master = gsap.timeline();
const child = gsap.timeline();
child.to(".a", { x: 100 }).to(".b", { y: 50 });
master.add(child, 0);

再生制御

tl.play()、tl.pause()、tl.reverse()、tl.restart()、tl.time(2)、tl.progress(0.5)、tl.kill()。


パフォーマンス

Transform と Opacity を優先

x、y、scale、rotation、opacity のアニメーションはコンポジター上で処理されます。transform で同じ効果が得られる場合は、width、height、top、left を避けてください。

will-change

will-change: transform;

実際にアニメーションする要素にのみ使用します。

gsap.quickTo() 頻繁な更新に

let xTo = gsap.quickTo("#id", "x", { duration: 0.4, ease: "power3" }),
  yTo = gsap.quickTo("#id", "y", { duration: 0.4, ease: "power3" });
container.addEventListener("mousemove", (e) => {
  xTo(e.pageX);
  yTo(e.pageY);
});

スタガー > 多数のトゥイーン

手動で遅延を設定した個別のトゥイーンではなく、stagger を使用してください。

クリーンアップ

画面外のアニメーションは一時停止または破棄してください。


参考資料(オンデマンドで読み込み)

  • references/effects.md — ドロップインエフェクト: タイプライターテキスト、オーディオビジュアライザー。HyperFrames で既製のエフェクトパターンが必要な場合に参照してください。

ベストプラクティス

  • camelCase のプロパティ名を使用し、トランスフォームエイリアスと autoAlpha を優先。
  • delay によるチェーンよりもタイムラインを優先し、位置パラメータを使用。
  • 読みやすいシーケンスのために addLabel() でラベルを追加。
  • タイムラインコンストラクタに defaults を渡す。
  • 再生制御が必要な場合は、トゥイーン/タイムラインの戻り値を変数に格納。

禁止事項

  • transform で十分な場合にレイアウトプロパティ(width/height/top/left)をアニメーションしない。
  • 同じ SVG 要素で svgOrigin と transformOrigin の両方を使用しない。
  • タイムラインでシーケンス処理できる場合に delay でアニメーションをチェーンしない。
  • DOM が存在する前にトゥイーンを作成しない。
  • クリーンアップを省略しない — 不要になったトゥイーンは必ず破棄する。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

zroeschen/Video-Production-Factory

Agent 2 of the video editing pipeline. Finds and removes spoken mistakes — stutters, repeated words, false starts, and retakes (re-recorded lines) — from a talking-head recording. Use after cut-silences, when asked to cut mistakes, remove stutters / repeats / filler restarts, clean up flubs, or keep the best take. Works review-gated: it proposes every cut with context and a reason for approval, then renders only the approved cuts via ffmpeg. Requires a word-level transcript.

zroeschen/Video-Production-Factory

Agent 1 of the video editing pipeline. Removes silences and dead air from a talking-head recording. Use when asked to cut silences, trim pauses, remove dead air / gaps, or tighten the pacing of a raw video, given a word-level transcript. Produces an edit list (EDL), a re-timed transcript for downstream agents, and optionally the cut video via ffmpeg. Does NOT cut mistakes, repeats, or false starts — that is the cut-mistakes agent.

zroeschen/Video-Production-Factory

Edit a raw talking-head video through transcription, silence trimming, mistake review, visual storytelling, motion graphics, and verified HyperFrames rendering. Use for a complete edit; route a single requested operation directly to its specialist skill.

zroeschen/Video-Production-Factory

HyperFrames CLI tool — hyperframes init, lint, preview, render, transcribe, tts, doctor, browser, info, upgrade, compositions, docs, benchmark. Use when scaffolding a project, linting or validating compositions, previewing in the studio, rendering to video, transcribing audio, generating TTS, or troubleshooting the HyperFrames environment.

関連スキル