Communitygithub.com

astudio · GSAP

Astudio による GSAP モーション:タイムライン、ScrollTrigger を用いたスクロールストーリーテリング(ピン留め、スクラブ、横スクロールギャラリー、パララックス)、SplitText による見出しのテキストリビール、Flip レイアウトトランジション、MorphSVG/DrawSVG/MotionPath、Draggable/Inertia/Observer、CustomEase、quickTo カーソルフォロワー、Lenis スムーススクロール、ページトランジション(Barba、View Transitions)、アワードレベルのランディングページモーションを Vanilla JS、React(useGSAP)、Next.js、Vue、Nuxt、Svelte、Astro で実現。クリーンアップ、レスポンシブ、動き軽減の処理は gsap.matchMedia で行います。

astudio · GSAP とは?

このスキルは、Astudio のシニアクリエイティブデベロッパーが提供する、GSAP を用いた高度なモーションデザインとアニメーションの専門知識を体系化したものです。ScrollTrigger によるスクロールストーリーテリング、SplitText によるテキストリビール、MorphSVG/DrawSVG/MotionPath などのプラグインを駆使し、Awwwards レベルのランディングページやポートフォリオサイト全体のコレオグラフィーを実現します。React、Next.js、Vue、Nuxt、Svelte、Astro など主要なフレームワークに対応し、useGSAP によるクリーンアップや gsap.matchMedia によるレスポンシブ・アクセシビリティ対応を標準化。Lenis スムーススクロールの連携、ページトランジション(Barba、View Transitions)の実装、motion.cjs や motion_lint.py を用いた品質チェックまでカバーします。すべての GSAP プラグインは無料で npm パッケージから利用可能です。

対応~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/whoamnesia/motion-3d/tree/HEAD/skills/gsap

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

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

ドキュメント

astudio · GSAP は何をしますか?

役割: astudio.one のシニアクリエイティブデベロッパー(15年以上の経験) - 60fps を維持し、読者を閉じ込めない Awwwards レベルのスクロールストーリーとタイムラインを作成します。基準: <root>/reference/studio-bar.md; <root> はこのスキルのベースディレクトリの 2 階層上、または scripts/motion.cjs を保持するフォルダです。

セットアップの事実(間違えないように)

  • npm i gsap - すべてのプラグインは無料で公開パッケージに含まれています(SplitText、MorphSVG、DrawSVG、ScrollSmoother、Inertia など)。.npmrc に GreenSock トークンを生成したり、ユーザーを古い Club レジストリに送信しないでください。
  • gsap/<Plugin> からインポートし、gsap.registerPlugin(...) をモジュールのトップレベルで 1 回だけ実行します(再レンダリングするコンポーネント内では実行しないでください)。React: npm i @gsap/react、gsap.registerPlugin(useGSAP)。
  • 静的ページ用 CDN: https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js(+ /dist/ScrollTrigger.min.js、SplitText.min.js、DrawSVGPlugin.min.js、MotionPathPlugin.min.js); Lenis: https://unpkg.com/[email protected]/dist/lenis.min.js。

サイト全体のアニメーション(マーケティング、ランディング、ブランド、ポートフォリオ) - トータルコレオグラフィー

最初に <root>/reference/site-motion.md をお読みください。ユーザーはすべての要素(テキストを含む)が滑らかかつ調和して動作することを期待しており、静止したセクションの上で動くヒーローは失敗です。

  1. templates/site-motion.js + templates/site-motion.css から始めてください(プロジェクトにコピーします):コンテンツタイプごとのリビール文法、イントロタイムライン、Lenis、ラベルロールボタン、マグネティックプル、カウンター、マーキー、マップ/ルート用の SiteMotion.map()。ブランドごとにトークンを調整します(SiteMotion.init({ tokens: {...} }))、スムースネスの下限を下回らないようにします。
  2. すべての可視要素に data-reveal="<type>" をタグ付けします(見出し、段落、ラベル、ボタン、リンク、画像、カード、行、アイコン、数字、区切り線、バッジ、ヘッダー、フッター)。ヒーローコンテナには data-hero を、マップには data-map とマップ属性を追加します。インラインの <head> スクリプト(sm-js + フェイルセーフ)を追加します。
  3. ヒーローフォトは hero-image とします(フレーム0で表示、LCPセーフ)。次に、同じトークンを使用して、その上にシグネチャ(ピン留めされたシーン、マップジャーニー、3Dリビール)をデザインします。
  4. 確認: node <root>/scripts/motion.cjs coverage index.html(FAIL なし、動きのある要素 90% 以上、テキストを含む、LCP デルタ < 300ms)· motion.cjs check index.html --duration 2.5(hard-stop なし、empty-opening なし)· ヒーローとスクロールセクションのストリップ · motion_lint.py . --mode marketing。

ワークフロー(あらゆる GSAP ジョブ)

  1. 瞬間を決定します(<root>/reference/direction.md):どの ONE シーンがシグネチャか(ヒーローイントロ、ピン留めストーリー、横スクロールギャラリー、テキストリビール)、そしてショーケースサイトではその周りのトータルコレオグラフィー(<root>/reference/site-motion.md)。パターンを検索: search.py "<idea>" -d gsap / -d ui / -d transition。
  2. 遅延チェーンではなく、タイムラインを構築します(references/core.md):タイムラインにデフォルトを設定し、オーバーラップ用の位置パラメータ("<"、"-=0.3"、ラベル)、ロールごとのイージング(到着には expo.out、移動には power2.inOut、スクラブには none)。
  3. スクロール(references/scrolltrigger.md):ScrollTrigger はタイムラインまたはトップレベルのトゥイーンのみに設定。scrub または toggleActions を使用。ピンは 2〜3 画面以内で、進行状況が可視であること。containerAnimation では ease: "none" を使用。トリガーは上から下に作成(または refreshPriority を使用)。画像/フォント/動的コンテンツの後に ScrollTrigger.refresh() を実行。
  4. 必要に応じてプラグインを使用(references/plugins.md):SplitText(マスク内の行/単語、レスポンシブ用の autoSplit + onSplit、クリーンアップ時に revert)、Flip、MorphSVG/DrawSVG、MotionPath、Draggable+Inertia、Observer、ScrollSmoother または Lenis、CustomEase。SplitText: 見出しは単語/文字ごと、本文は行ごと(mask: "lines")、リビール終了時に revert。
  5. フレームワークの配線とクリーンアップ(references/frameworks.md):React では useGSAP({ scope }) を contextSafe と共に使用してハンドラーを処理。その他では gsap.context() + revert() を使用。アンマウント時とルート変更時に kill/revert。
  6. レスポンシブ + アクセシビリティを一箇所で:gsap.matchMedia() を条件 isDesktop、reduceMotion(<root>/reference/accessibility.md のティア - 動き軽減時はピン/パララックス/スクラブ移動なし、フェードは維持)と共に使用。コンテンツは JavaScript なしでも表示可能: matchMedia 内で gsap.set を使用して非表示の開始状態を設定するか、autoAlpha の from トゥイーンを使用。
  7. 確認: node <root>/scripts/motion.cjs strip page.html --duration 3 --frames 12 でロードタイムラインを確認。スクロールシーンでは、t をスクロール位置または進行状況にマッピングするテストフックを公開し(references/scrolltrigger.md §6)、それをストリップ。motion_lint.py src --mode marketing。

ルール

  • エイリアス(x、y、xPercent、scale、rotation)と autoAlpha を使用すること - 移動に top/left/width/height をアニメーションさせない。トゥイーン後に CSS が引き継ぐべき場合は clearProps を使用。
  • 同じターゲットの同じプロパティに対して複数の from()/fromTo() を使用する場合:後のものには immediateRender: false を設定。
  • 再トリガーされる可能性のあるトゥイーンには overwrite: "auto" を使用。カーソルフォロワー/マグネティックボタンには gsap.quickTo() を使用。
  • 本番環境では markers: true を使用しない。アニメーション用の scroll リスナーを使用しない。
  • 必要なものだけをピン留め。スムーズな重み付けには scrub: 0.8-1.2 を使用(可視移動では生の scrub: true を使用しない)。ピンがジャンプする場合は anticipatePin: 1 を使用。ビューポートサイズに依存する関数ベースの値には invalidateOnRefresh を使用。
  • ショーケースサイトのスムースネスの下限: リビールは expo.out/power4.out で 0.9秒以上、オーバーラップするステガー、内部スケールによるイメージワイプ。全てがフルスピードで停止しない(motion.cjs check -> hard-stop)。
  • SVG の変形原点: GSAP の transformOrigin/svgOrigin のみを使用 - CSS の transform-box は併用しない(二重オフセットになる)。
  • スムーススクロール(Lenis/ScrollSmoother)はデスクトップのファインポインターのみで有効に。動き軽減時とタッチ時はオフ。Lenis をティッカーに接続(lenis.on('scroll', ScrollTrigger.update); gsap.ticker.add(t => lenis.raf(t * 1000)); gsap.ticker.lagSmoothing(0))。
  • ビデオタイムライン(astudio-motion:motion-video):一時停止されたマスタータイムライン1つ、window.__seek = t => tl.seek(t)、repeat: -1 は使用しない、シードなしで Math.random() を使用しない。

Individual skills in this repo

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

whoamnesia/lottie-rive

Lottie and Rive by astudio: integrating, controlling and optimising designer-made animation in products - dotLottie/Lottie playback, segments, scroll-driven and interactive Lottie, runtime theming, size optimisation; Rive state machines (inputs, transitions, listeners), data binding with view models, events, runtimes for web, React, React Native, iOS, Android, Flutter; choosing Lottie vs Rive vs code; preparing files for handoff (After Effects + Bodymovin, Figma Motion, Lottie Creator, Cavalry exports). Use for "Lottie", ".lottie", "Bodymovin", "Rive", ".riv", "state machine animation", "interactive illustration", "анимированная иконка из After Effects", "встроить анимацию от дизайнера".

whoamnesia/motion-review

Motion review and audit by astudio: reviews animation code and rendered motion against a strict craft bar, audits a whole codebase's motion, diagnoses jank and performance, finds where motion is missing (opportunities) and removes motion that should not exist - for websites, product UI, GSAP/Motion/CSS, Lottie/Rive, three.js and rendered videos. Use for "review my animations", "why is this janky", "this feels cheap/slow/AI-made", "audit the motion", "where should we add animation", "remove unnecessary animations", "проверь анимации", "почему дёргается", "аудит моушена". Default to flagging; approval is earned. Outputs a findings table and a Block/Approve verdict, with rendered strips as evidence.

whoamnesia/ui-motion

Interface animation by astudio: builds motion for UI components and flows - buttons, dropdowns, popovers, tooltips, modals, drawers, toasts, accordions, tabs, lists, skeletons, route/page transitions, shared-element morphs, drag and gestures - with CSS (@starting-style, scroll-driven animations), WAAPI, View Transitions, Motion (motion.dev / framer-motion) in React, Vue, Svelte or plain HTML; defines motion systems and tokens; implements Figma Motion designs via the Figma MCP (get_motion_context). Use for "animate this component", "add a transition", "make it feel alive/smooth/native", "page transition", "motion tokens", "микроанимации", "анимация интерфейса", "плавные переходы". Decides whether something should animate at all before writing code.

関連スキル