Communitygithub.com

astudio · Lottie & Rive

Lottie と Rive に特化したアニメーション統合スキル。デザイナー制作のアニメーションを高品質・軽量・インタラクティブに製品へ組み込むためのワークフローを提供します。

astudio · Lottie & Rive とは?

このスキルは、デザイナーが制作したアニメーションを、Lottie と Rive の2つの形式で効果的に統合・制御・最適化するための包括的なガイドです。Lottie では `.lottie` ファイル形式(dotLottie ランタイム)の推奨、再生/停止/セグメント制御、スクロール連動、ランタイムテーマ変更、ファイルサイズ最適化などの実践的なワークフローを提供します。Rive ではステートマシン(入力、トランジション、リスナー)、ビューモデルによるデータバインディング、イベント処理、Web/React/React Native/iOS/Android/Flutter 各ランタイムの利用方法をカバーします。また、Lottie と Rive の適切な使い分け、After Effects(Bodymovin)、Figma Motion、Lottie Creator、Cavalry からのファイル書き出し準備、アクセシビリティ対応、パフォーマンス最適化など、デザイナーとエンジニアのハンドオフに必要な知識を網羅しています。このスキルは `SKILL.md` として実装され、Claude Code などのAIエージェントがプロジェクト内でアニメーションに関する指示を受けた際に参照できます。

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

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

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

ドキュメント

astudio · Lottie & Rive は何をしますか?

役割: astudio.one のシニアモーションデザイナー兼クリエイティブデベロッパー(15年以上)— デザイナー制作のアニメーションを、高品質・軽量・インタラクティブに製品へ届けます。 基準ファイル: <root>/reference/studio-bar.md; <root> はこのスキルのベースディレクトリから2階層上、または scripts/motion.cjs を含むフォルダ。

形式の選択

必要なもの選択肢
デザイナー制作のリニアアニメーション(アイコン、イラスト、オンボーディング画面、空状態)で再生/停止/セグメント制御したい場合Lottie (.lottie、dotLottie ランタイム使用)
インタラクティブで状態を持ち、入力やアプリデータに反応するアニメーション(状態を持つボタン、キャラクター、進捗、ゲームUI、データ駆動型イラスト)Rive(ステートマシン + データバインディング)
シンプルなUI状態変化、ホバー/プレス、トランジションCSS/Motion (astudio-motion:ui-motion) — ファイル不要
SVGで描画しコードでアニメーション可能なロゴ/アイコンSVG + GSAP (astudio-motion:svg-motion) — アプリのランタイムで必要な場合のみLottieに書き出し
ビデオのようなコンテンツ(人物、実写)ビデオ(<video>)、Lottieは非推奨

Lottie ワークフロー(references/lottie.md)

  1. .lottie(zip形式、60〜80%小型化、画像/テーマ/ステートマシンをバンドル)と @lottiefiles/dotlottie-web(canvas + WASM)または @lottiefiles/dotlottie-react を推奨。lottie-web はレガシーなSVGレンダラーが必要な場合のみ使用。
  2. 制御: play/pause/stop/setSpeed/setMode/setFrame/setSegment、イベント load/complete/frame。セグメントベースの「ステートマシン」(checked セグメントを再生し、その後 idle をループ)。
  3. スクロール: スクロール進捗を setFrame にマッピング。@lottiefiles/lottie-interactivity で配線不要のインタラクティブ性。
  4. ランタイムテーマ(ブランドカラー、ダークモード)は dotLottie のテーマ/スロットで実現 — 2つのファイルを出荷する必要なし。
  5. 最適化: 非表示レイヤー/未使用アセットの削除、不要なラスター画像の除去、マスク/マット/エフェクトは少なめに(非対応または低速)、表示フレーム範囲にトリミング、ファイルサイズの確認(アイコンは50〜100KB未満)。
  6. アクセシビリティ: role="img" + aria-label。動きの軽減設定時は一時停止(setFrame で意味のある静止フレームを表示)。5秒以上の自動再生ループには一時停止コントロールを設置。

Rive ワークフロー(references/rive.md)

  1. エディター内: アートボード、タイムライン、ステートマシン(状態、条件付きトランジション、入力:ブール/数値/トリガー、ポインターイベント用リスナー)、ビューモデル(文字列/数値/カラー/列挙/トリガー/リストプロパティをシーンプロパティにバインド)、アプリコールバック用イベント。
  2. ランタイム: @rive-app/react-canvas(useRive、useStateMachineInput、useViewModel、useViewModelInstance*)、@rive-app/canvas(バニラ用)、iOS/Android/Flutter/RN用ネイティブランタイム。重いシーンにはWebGL2レンダラー。
  3. アプリデータから駆動(データバインディング)— 多数の入力を避ける。アプリの反応にはRiveイベントをリッスン。
  4. 重要なファイルは事前読み込み。useRive のレイアウト(Fit、Alignment)でキャンバスサイズを設定。画面外では一時停止。

確認方法

node <root>/scripts/motion.cjs strip page.html --duration <s> を実行すると、Lottie/Riveファイルをホストするページをレンダリングします(クロックモードでrAFループを駆動)。最初と最後のフレーム、セグメント境界、テーマ適用後の色を確認します。

デザイナー向け引き継ぎノート

  • AE → Lottie: Bodymovin/LottieFiles プラグインを使用。対応: シェイプレイヤー、トランスフォーム、トリムパス、マスク(制限あり)、テキスト(アウトライン推奨)、プリコンポーズ。回避: エクスプレッション多用のリグ、エフェクト、3Dレイヤー、ブレンドモード。
  • Figma Motion は MP4/GIF/SVG/WebM とコード(CSS/React/motion.dev)に書き出し — Lottie には Lottie Creator または LottieFiles プラグインを使用。Cavalry は Lottie をネイティブに書き出し。
  • レイヤーには意味のある名前をつける(テーマ設定やデバッグのセレクターになる); テーマを含む .lottie で納品する。

Individual skills in this repo

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

whoamnesia/gsap

GSAP motion by astudio: timelines, ScrollTrigger scroll storytelling (pin, scrub, horizontal galleries, parallax), SplitText headline reveals, Flip layout transitions, MorphSVG/DrawSVG/MotionPath, Draggable/Inertia/Observer, CustomEase, quickTo cursor followers, Lenis smooth scroll, page transitions (Barba, View Transitions) and award- style landing-page motion in vanilla JS, React (useGSAP), Next.js, Vue, Nuxt, Svelte and Astro - with cleanup, responsive and reduced-motion handling via gsap.matchMedia. Use for "GSAP", "ScrollTrigger", "scroll animation", "pinned section", "horizontal scroll", "text reveal", "как на Awwwards", "анимация при скролле", "параллакс". All GSAP plugins are free (GSAP 3.13+).

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.

関連スキル