Communitygithub.com

Makepadアニメーションスキル

Makepad UIフレームワークにおけるアニメーション、トランジション、ホバー状態、アニメータタイムラインの構築とデバッグに特化したスキルです。

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

このスキルはMakepad UIフレームワークのアニメーションシステムを扱うために設計されています。開発者はこれを使って、ホバー、プレス、フォーカス、無効状態などのインタラクションに対応したアニメーションを迅速に作成できます。Makepadのアニメーターシステムは`animator`ブロックで定義され、各状態(on/off)に対して`from`でトランジション方法、`apply`でアニメーション対象プロパティを指定します。対応するプラットフォームはMakepad-widgets(devブランチ)で、CLIツールCargoやMakepadプロジェクトと連携します。本スキルは`SKILL.md`とローカルリファレンスファイル`./references/animation-system.md`に基づいており、ドキュメントが不足している場合はユーザーに更新を促します。主な機能として、基本的なホバーアニメーション、マルチステートアニメーション、フォーカス・無効状態の切り替え、イージング関数(Linear、InOutQuad、Elasticなど)、タイムラインタイプ(Forward、Snap、Loop、BounceLoop)をサポートします。Rust APIでは`AnimatorImpl`トレイトを介して`animator_play`や`animator_cut`で状態遷移をプログラムできます。このスキルはMakepad固有のアニメーションパターンに特化しており、汎用的なRust UIガイダンスには使用しません。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/AlperTuncOrtak/crypto-data-pipeline/tree/HEAD/skills/makepad-animation

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

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

ドキュメント

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

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

更新確認: https://crates.io/crates/makepad-widgets

あなたはMakepadアニメーションのエキスパートです。以下の方法でユーザーを支援します:

  • コード作成: 以下のパターンに従ったアニメーションコードの生成
  • 質問回答: 状態、トランジション、タイムラインの説明

使用するタイミング

  • Makepadでアニメーション、トランジション、ホバー状態、アニメータタイムラインを構築またはデバッグする必要がある場合。
  • タスクにanimator、状態変化、イージング、キーフレーム、または視覚的インタラクションフィードバックが含まれる場合。
  • 一般的なRust UIガイダンスではなく、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: "ホバーミー"

    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, カスタム)
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 20 individual skills — each has its own dedicated page.

AlperTuncOrtak/crypto-data-pipeline

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

AlperTuncOrtak/crypto-data-pipeline

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

AlperTuncOrtak/crypto-data-pipeline

One sentence - what this skill does and when to invoke it

AlperTuncOrtak/crypto-data-pipeline

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.

AlperTuncOrtak/crypto-data-pipeline

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

AlperTuncOrtak/crypto-data-pipeline

Pull a YouTube video transcript into a queryable markdown vault with yt-dlp subtitle discovery, VTT cleanup, metadata frontmatter, and capture-seed stubs.

AlperTuncOrtak/crypto-data-pipeline

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities.

AlperTuncOrtak/crypto-data-pipeline

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.

AlperTuncOrtak/crypto-data-pipeline

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

AlperTuncOrtak/crypto-data-pipeline

Best practices for Remotion - Video creation in React

AlperTuncOrtak/crypto-data-pipeline

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

AlperTuncOrtak/crypto-data-pipeline

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

AlperTuncOrtak/crypto-data-pipeline

Writes complete, structured landing pages optimized for SEO ranking, AEO citation, and visitor conversion. Activate when the user wants to write or generate a landing page for a product, service, or offer.

AlperTuncOrtak/crypto-data-pipeline

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

AlperTuncOrtak/crypto-data-pipeline

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.

AlperTuncOrtak/crypto-data-pipeline

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.

AlperTuncOrtak/crypto-data-pipeline

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

AlperTuncOrtak/crypto-data-pipeline

One sentence - what this skill does and when to invoke it

AlperTuncOrtak/crypto-data-pipeline

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.

AlperTuncOrtak/crypto-data-pipeline

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

関連スキル