Communitygithub.com

AbobakrDiara61/railway-system

CRITICAL: Makepadアニメーションシステム用。以下のトリガーで起動: makepad animation, makepad animator, makepad hover, makepad state, makepad transition, "from: { all: Forward", makepad pressed, makepad 动画, makepad 状态, makepad 过渡, makepad 悬停效果

railway-system とは?

このスキルは、Makepad UIフレームワークにおけるアニメーションシステムの実装とデバッグに特化しています。Makepadのアニメーター、状態遷移、ホバー効果、キーフレームなどの複雑なアニメーションパターンを、具体的なコード例と共に提供します。対応プラットフォームはMakepad-widgets(devブランチ)で、アニメーションに関連するすべての開発タスクを支援します。このスキルは、Makepadのアニメーター構造(animatorブロック、状態定義、from/applyセクション)、イージング関数(InOutQuadやElasticなど)、タイムラインタイプ(Forward、Snap、Loopなど)を体系的にカバーしています。開発者は、ボタンのホバーアニメーションやマルチステートアニメーション、フォーカス状態、無効状態など、実際のウィジェットに適用可能なパターンをすぐに活用できます。また、Rust API(AnimatorImplトレイト)を用いたプログラム的なアニメーション制御方法も提供しており、Makepadを使用したインタラクティブなUI開発において不可欠なリファレンスです。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/AbobakrDiara61/railway-system/tree/HEAD/frontend/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: "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 20 individual skills — each has its own dedicated page.

AbobakrDiara61/railway-system

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

AbobakrDiara61/railway-system

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

AbobakrDiara61/railway-system

Astropy is the core Python package for astronomy, providing essential functionality for astronomical research and data analysis.

AbobakrDiara61/railway-system

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

AbobakrDiara61/railway-system

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.

AbobakrDiara61/railway-system

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

AbobakrDiara61/railway-system

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.

AbobakrDiara61/railway-system

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.

AbobakrDiara61/railway-system

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

AbobakrDiara61/railway-system

Best practices for Remotion - Video creation in React

AbobakrDiara61/railway-system

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

AbobakrDiara61/railway-system

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

AbobakrDiara61/railway-system

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.

AbobakrDiara61/railway-system

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

AbobakrDiara61/railway-system

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.

AbobakrDiara61/railway-system

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.

AbobakrDiara61/railway-system

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

AbobakrDiara61/railway-system

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

AbobakrDiara61/railway-system

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.

AbobakrDiara61/railway-system

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

関連スキル