Communitygithub.com

Makepad アニメーションスキル

Makepad アニメーションシステム(ホバー、プレス、フォーカス、無効、選択など)のコード生成と説明を行います。

Makepad アニメーションスキル とは?

このスキルは、Makepad ウィジェットフレームワークのアニメーションシステムに特化した Claude Code などの AI エージェント向けスキルです。ホバー、プレス、フォーカス、無効化、選択などの一般的な状態に対するアニメーションコードの生成と、Makepad のアニメーション概念(ステート、トランジション、タイムライン、イージング関数)の説明を行います。サポートするプラットフォームは Claude Code、Cursor、Codex など、コード生成および Markdown ドキュメントに対応した AI エージェントです。スキルは SKILL.md に定義されたパターンに基づいて動作し、必要に応じてローカルのリファレンスドキュメント(./references/animation-system.md)を参照します。ドキュメントが不完全な場合は、/sync-crate-skills makepad --force コマンドで更新するようユーザーに促します。Makepad アニメーションを使用するすべての開発者にとって、迅速で応答性の高い UI アニメーションを作成するための実用的なガイドとなります。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Desesbraker/agentes-vip/tree/HEAD/full%20skill/plugins/antigravity-awesome-skills-claude/skills/makepad-animation

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

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

ドキュメント

Makepad アニメーションスキル は何をしますか?

バージョン: makepad-widgets (dev ブランチ) | 最終更新: 2026-01-19

アップデートを確認: https://crates.io/crates/makepad-widgets

あなたは Makepad アニメーションの専門家です。以下の方法でユーザーを支援します:

  • コードを書く: 以下のパターンに従ってアニメーションコードを生成します
  • 質問に答える: ステート、トランジション、タイムラインについて説明します

ドキュメント

詳細なドキュメントについては、ローカルファイルを参照してください:

  • ./references/animation-system.md - 完全なアニメーションリファレンス

高度なパターン

プロダクション対応のアニメーションパターンについては、_base/ ディレクトリを参照してください:

パターン説明
06-animator-basicsアニメーターの基礎
07-easing-functionsイージングとタイミング
08-keyframe-animation複雑なキーフレーム

重要: ドキュメントの完全性チェック

質問に答える前に、Claude は以下を実行する必要があります:

  1. 上記の関連リファレンスファイルを読む
  2. ファイルの読み取りに失敗した場合、またはファイルが空の場合:
    • ユーザーに通知: 「ローカルドキュメントが不完全です。/sync-crate-skills makepad --force を実行してドキュメントを更新することをお勧めします」
    • SKILL.md のパターンと組み込みの知識に基づいて回答する
  3. リファレンスファイルが存在する場合は、その内容を回答に組み込む

主要パターン

1. 基本ホバーアニメーション

<Button> {
    text: "Hover Me"

    animator: {
        hover = {
            default: off

            off = {
                from: { all: Forward { duration: 0.15 } }
                apply: {
                    draw_bg: { color: #333333 }
                }
            }

            on = {
                from: { all: Forward { duration: 0.15 } }
                apply: {
                    draw_bg: { color: #555555 }
                }
            }
        }
    }
}

2. マルチステートアニメーション

<View> {
    animator: {
        hover = {
            default: off
            off = {
                from: { all: Forward { duration: 0.2 } }
                apply: { draw_bg: { color: #222222 } }
            }
            on = {
                from: { all: Forward { duration: 0.2 } }
                apply: { draw_bg: { color: #444444 } }
            }
        }

        pressed = {
            default: off
            off = {
                from: { all: Forward { duration: 0.1 } }
                apply: { draw_bg: { scale: 1.0 } }
            }
            on = {
                from: { all: Forward { duration: 0.1 } }
                apply: { draw_bg: { scale: 0.95 } }
            }
        }
    }
}

3. フォーカスステートアニメーション

<TextInput> {
    animator: {
        focus = {
            default: off

            off = {
                from: { all: Forward { duration: 0.2 } }
                apply: {
                    draw_bg: {
                        border_color: #444444
                        border_size: 1.0
                    }
                }
            }

            on = {
                from: { all: Forward { duration: 0.2 } }
                apply: {
                    draw_bg: {
                        border_color: #0066CC
                        border_size: 2.0
                    }
                }
            }
        }
    }
}

4. 無効ステート

<Button> {
    animator: {
        disabled = {
            default: off

            off = {
                from: { all: Snap }
                apply: {
                    draw_bg: { color: #0066CC }
                    draw_text: { color: #FFFFFF }
                }
            }

            on = {
                from: { all: Snap }
                apply: {
                    draw_bg: { color: #333333 }
                    draw_text: { color: #666666 }
                }
            }
        }
    }
}

アニメーター構造

プロパティ説明
animatorアニメーションのルートコンテナ
{state} =ステート定義 (hover, pressed, focus, disabled)
default:初期ステート値
{value} =ステート値の定義 (on, off, custom)
from:トランジションタイムライン
apply:アニメーションするプロパティ

タイムラインタイプ (Play 列挙型)

タイプ説明
Forward { duration: f64 }線形フォワードアニメーション
Snap即時変更、トランジションなし
Reverse { duration: f64, end: f64 }リバースアニメーション
Loop { duration: f64, end: f64 }ループアニメーション
BounceLoop { duration: f64, end: f64 }バウンスループアニメーション

イージング関数 (Ease 列挙型)

// 基本
Linear

// 二次
InQuad, OutQuad, InOutQuad

// 三次
InCubic, OutCubic, InOutCubic

// 四次
InQuart, OutQuart, InOutQuart

// 五次
InQuint, OutQuint, InOutQuint

// 正弦波
InSine, OutSine, InOutSine

// 指数
InExp, OutExp, InOutExp

// 円形
InCirc, OutCirc, InOutCirc

// 弾性
InElastic, OutElastic, InOutElastic

// バック
InBack, OutBack, InOutBack

// バウンス
InBounce, OutBounce, InOutBounce

// カスタム
ExpDecay { d1: f64, d2: f64 }
Bezier { cp0: f64, cp1: f64, cp2: f64, cp3: f64 }
Pow { begin: f64, end: f64 }

イージングの使用

from: {
    all: Ease { duration: 0.3, ease: InOutQuad }
}

一般的なステート

ステート値トリガー
hoveron, offマウスが入る/出る
pressed / downon, offマウス押す/離す
focuson, offフォーカスを得る/失う
disabledon, offウィジェット有効/無効
selectedon, off選択の変更

アニメーション可能なプロパティ

ほとんどの draw_* シェーダーユニフォームはアニメーション可能です:

  • 色: color, border_color, shadow_color
  • サイズ: border_size, border_radius, shadow_radius
  • 変形: scale, rotation, offset
  • 不透明度: opacity

コードを書くとき

  1. 常に default: で初期ステートを設定する
  2. スムーズなトランジションには Forward を使用する
  3. 即時ステート変更(無効など)には Snap を使用する
  4. 応答性を高めるため、継続時間は短く(0.1〜0.3秒)保つ
  5. draw_bg, draw_text などでシェーダーユニフォームをアニメーションする

Rust API (AnimatorImpl トレイト)

pub trait AnimatorImpl {
    // ステートにアニメーション
    fn animator_play(&mut self, cx: &mut Cx, state: &[LiveId; 2]);

    // ステートにカット(アニメーションなし)
    fn animator_cut(&mut self, cx: &mut Cx, state: &[LiveId; 2]);

    // 現在のステートを確認
    fn animator_in_state(&self, cx: &Cx, state: &[LiveId; 2]) -> bool;
}

// 使用例
fn handle_event(&mut self, cx: &mut Cx, event: &Event, scope: &mut Scope) {
    match event.hits(cx, self.area()) {
        Hit::FingerHoverIn(_) => {
            self.animator_play(cx, id!(hover.on));
        }
        Hit::FingerHoverOut(_) => {
            self.animator_play(cx, id!(hover.off));
        }
        Hit::FingerDown(_) => {
            self.animator_play(cx, id!(pressed.on));
        }
        Hit::FingerUp(_) => {
            self.animator_play(cx, id!(pressed.off));
        }
        _ => {}
    }
}

質問に答えるとき

  1. ステートは独立しており、複数のステートを同時にアクティブにできます
  2. アニメーションは、ステートがその値に達したときにプロパティを適用します
  3. from は「どのように」アニメーションするかを定義し、apply は「何を」アニメーションするかを定義します
  4. Makepad は古い値と新しい値の間を自動的に補間します
  5. Rust でアニメーションステートを参照するには id!(state.value) マクロを使用します

Individual skills in this repo

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

Desesbraker/agentes-vip

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

Desesbraker/agentes-vip

Advanced JavaScript animation library skill for creating complex, high-performance web animations.

Desesbraker/agentes-vip

Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects. Use when animations stutter, transitions jank, or reviewing CSS/JS animation performance.

Desesbraker/agentes-vip

Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.

Desesbraker/agentes-vip

AI-powered animation tool for creating motion in logos, UI, icons, and social media assets.

Desesbraker/agentes-vip

Best practices for Remotion - Video creation in React

Desesbraker/agentes-vip

Generate walkthrough videos from Stitch projects using Remotion with smooth transitions, zooming, and text overlays

Desesbraker/agentes-vip

Seek and analyze video content using Memories.ai Large Visual Memory Model for persistent video intelligence

Desesbraker/agentes-vip

Three.js animation - keyframe animation, skeletal animation, morph targets, animation mixing. Use when animating objects, playing GLTF animations, creating procedural motion, or blending animations.

Desesbraker/agentes-vip

Automate TikTok tasks via Rube MCP (Composio): upload/publish videos, post photos, manage content, and view user profiles/stats. Always search tools first for current schemas.

Desesbraker/agentes-vip

Video and audio perception, indexing, and editing. Ingest files/URLs/live streams, build visual/spoken indexes, search with timestamps, edit timelines, add overlays/subtitles, generate media, and create real-time alerts.

Desesbraker/agentes-vip

Upload, stream, search, edit, transcribe, and generate AI video and audio using the VideoDB SDK.

Desesbraker/agentes-vip

Automate YouTube tasks via Rube MCP (Composio): upload videos, manage playlists, search content, get analytics, and handle comments. Always search tools first for current schemas.

Desesbraker/agentes-vip

Extract transcripts from YouTube videos and generate comprehensive, detailed summaries using intelligent analysis frameworks

Desesbraker/agentes-vip

Generates high-converting Next.js/React landing pages with Tailwind CSS. Uses PAS, AIDA, and BAB frameworks for optimized copy/components (Heroes, Features, Pricing). Focuses on Core Web Vitals/SEO.

Desesbraker/agentes-vip

You know a portfolio isn't a resume - it's a first impression that needs to convert. You balance creativity with usability. You understand that hiring managers spend 30 seconds on each portfolio. You make those 30 seconds count. You help people stand out without being gimmicky.

関連スキル