Communitygithub.com

AbobakrDiara61/railway-system

KRITISCH: Für das Makepad-Animationssystem verwenden. Wird ausgelöst durch: Makepad-Animation, Makepad-Animator, Makepad-Hover, Makepad-Zustand, Makepad-Übergang, "from: { all: Forward", Makepad gedrückt, Makepad 动画, Makepad 状态, Makepad 过渡, Makepad 悬停效果

Was ist railway-system?

Diese Fähigkeit ist ein spezialisiertes Werkzeug für die Arbeit mit dem Animationssystem von Makepad, einem UI-Framework in Rust. Sie hilft Entwicklern, Animationen, Übergänge, Hover-Zustände und Animator-Zeitpläne in Makepad-Widgets zu erstellen und zu debuggen. Die Fähigkeit unterstützt gängige Zustände wie Hover, Gedrückt, Fokus, Deaktiviert und Ausgewählt und bietet detaillierte Codebeispiele für deren Implementierung. Sie deckt alle wichtigen Konzepte ab: die Animator-Struktur, Timeline-Typen (Forward, Snap, Reverse, Loop, BounceLoop), Easing-Funktionen (von Linear bis zu benutzerdefinierten Bézier-Kurven) und die Rust-API über das `AnimatorImpl`-Trait. Die Fähigkeit ist plattformunabhängig und basiert auf der `makepad-widgets`-Crate (dev-Branch). Sie stellt sicher, dass Entwickler reaktionsschnelle (0,1–0,3 s) und flüssige Animationen mit minimalem Aufwand umsetzen können, und verweist für fortgeschrittene Muster auf lokale Referenzdateien.

Funktioniert mit✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/AbobakrDiara61/railway-system/tree/HEAD/frontend/skills/makepad-animation

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

Makepad-Animation-Skill

Version: makepad-widgets (dev-Branch) | Zuletzt aktualisiert: 2026-01-19

Prüfe auf Updates: https://crates.io/crates/makepad-widgets

Du bist ein Experte für Makepad-Animationen. Hilf Benutzern, indem du:

  • Code schreibst: Erstelle Animationscode gemäß den folgenden Mustern
  • Fragen beantwortest: Erkläre Zustände, Übergänge, Zeitpläne

Wann verwenden

  • Du musst Animationen, Übergänge, Hover-Zustände oder Animator-Zeitpläne in Makepad erstellen oder debuggen.
  • Die Aufgabe beinhaltet animator, Zustandsänderungen, Easing, Keyframes oder visuelles Interaktionsfeedback.
  • Du suchst Makepad-spezifische Animationsmuster anstatt allgemeiner Rust-UI-Anleitung.

Dokumentation

Siehe die lokalen Dateien für eine detaillierte Dokumentation:

  • ./references/animation-system.md - Vollständige Animationsreferenz

Fortgeschrittene Muster

Für produktionsreife Animationsmuster siehe das Verzeichnis _base/:

MusterBeschreibung
06-animator-basicsAnimator-Grundlagen
07-easing-functionsEasing und Timing
08-keyframe-animationKomplexe Keyframes

WICHTIG: Prüfung der Dokumentationsvollständigkeit

Bevor Claude Fragen beantwortet, MUSS er:

  1. Die relevante(n) oben aufgeführte(n) Referenzdatei(en) lesen
  2. Wenn das Lesen der Datei fehlschlägt oder die Datei leer ist:
    • Benutzer informieren: "Lokale Dokumentation unvollständig. Führe /sync-crate-skills makepad --force aus, um die Dokumentation zu aktualisieren."
    • Trotzdem basierend auf SKILL.md-Mustern + eingebautem Wissen antworten
  3. Wenn die Referenzdatei existiert, deren Inhalt in die Antwort einfließen lassen

Wichtige Muster

1. Einfache Hover-Animation

<Button> {
    text: "Hover über mich"

    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. Multi-Zustands-Animation

<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. Fokus-Zustands-Animation

<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. Deaktivierter Zustand

<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-Struktur

EigenschaftBeschreibung
animatorRoot-Animation-Container
{state} =Zustandsdefinition (hover, pressed, focus, disabled)
default:Anfangszustandswert
{value} =Zustandswertdefinition (on, off, benutzerdefiniert)
from:Übergangszeitplan
apply:Zu animierende Eigenschaften

Timeline-Typen (Play-Enum)

TypBeschreibung
Forward { duration: f64 }Lineare Vorwärtsanimation
SnapSofortige Änderung, kein Übergang
Reverse { duration: f64, end: f64 }Rückwärtsanimation
Loop { duration: f64, end: f64 }Wiederholungsanimation
BounceLoop { duration: f64, end: f64 }Bounce-Loop-Animation

Easing-Funktionen (Ease-Enum)

// Basis
Linear

// Quadratisch
InQuad, OutQuad, InOutQuad

// Kubisch
InCubic, OutCubic, InOutCubic

// Quartisch
InQuart, OutQuart, InOutQuart

// Quintisch
InQuint, OutQuint, InOutQuint

// Sinusförmig
InSine, OutSine, InOutSine

// Exponentiell
InExp, OutExp, InOutExp

// Kreisförmig
InCirc, OutCirc, InOutCirc

// Elastisch
InElastic, OutElastic, InOutElastic

// Zurück
InBack, OutBack, InOutBack

// Bounce
InBounce, OutBounce, InOutBounce

// Benutzerdefiniert
ExpDecay { d1: f64, d2: f64 }
Bezier { cp0: f64, cp1: f64, cp2: f64, cp3: f64 }
Pow { begin: f64, end: f64 }

Easing verwenden

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

Häufige Zustände

ZustandWerteAuslöser
hoveron, offMaus-Eingabe/-Verlassen
pressed / downon, offMaus drücken/loslassen
focuson, offFokus erhalten/verlieren
disabledon, offWidget aktiviert/deaktiviert
selectedon, offAuswahländerung

Animierbare Eigenschaften

Die meisten draw_* Shader-Uniforms können animiert werden:

  • Farben: color, border_color, shadow_color
  • Größen: border_size, border_radius, shadow_radius
  • Transformationen: scale, rotation, offset
  • Deckkraft: opacity

Beim Schreiben von Code

  1. Immer default: für den Anfangszustand setzen
  2. Forward für weiche Übergänge verwenden
  3. Snap für sofortige Zustandsänderungen (wie deaktiviert) verwenden
  4. Halte Dauern kurz (0,1–0,3 s) für ein reaktionsschnelles Gefühl
  5. Animiere Shader-Uniforms in draw_bg, draw_text, etc.

Rust-API (AnimatorImpl-Trait)

pub trait AnimatorImpl {
    // In Zustand animieren
    fn animator_play(&mut self, cx: &mut Cx, state: &[LiveId; 2]);

    // In Zustand springen (keine Animation)
    fn animator_cut(&mut self, cx: &mut Cx, state: &[LiveId; 2]);

    // Aktuellen Zustand prüfen
    fn animator_in_state(&self, cx: &Cx, state: &[LiveId; 2]) -> bool;
}

// Verwendungsbeispiel
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));
        }
        _ => {}
    }
}

Beim Beantworten von Fragen

  1. Zustände sind unabhängig – mehrere können gleichzeitig aktiv sein
  2. Animation wendet Eigenschaften an, wenn der Zustand diesen Wert erreicht
  3. from definiert WIE animiert wird, apply definiert WAS animiert wird
  4. Makepad interpolautomatisch zwischen alten und neuen Werten
  5. Verwende das Makro id!(state.value), um Animationszustände in Rust zu referenzieren

Einschränkungen

  • Verwende dieses Skill nur, wenn die Aufgabe eindeutig dem oben beschriebenen Umfang entspricht.
  • Behandle die Ausgabe nicht als Ersatz für umgebungsspezifische Validierung, Tests oder Expertenüberprüfung.
  • Halte an und frage nach Klärung, wenn erforderliche Eingaben, Berechtigungen, Sicherheitsgrenzen oder Erfolgskriterien fehlen.

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

Verwandte Skills