Communitygithub.com

ASoudy/AGS

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

Was ist AGS?

Dieses Skill ist ein spezialisiertes Werkzeug für Entwickler, die mit dem Animationssystem von Makepad arbeiten. Es bietet eine umfassende Referenz zur Erstellung von Animationen, Übergängen, Hover-Effekten und Zustandsänderungen in Makepad-Widgets. Das Skill deckt zentrale Konzepte wie den `animator`-Container, verschiedene Zustände (hover, pressed, focus, disabled), Timeline-Typen (Forward, Snap, Reverse, Loop, BounceLoop) und Easing-Funktionen ab. Es enthält detaillierte Codebeispiele für grundlegende Hover-Animationen, Multi-State-Animationen, Fokus-Zustände und deaktivierte Zustände. Das Skill unterstützt sowohl die deklarative Widget-Entwicklung (Live-Design) als auch die programmatische Rust-API über das `AnimatorImpl`-Trait. Es ist nützlich für alle, die reaktive UI-Elemente mit flüssigen Übergängen, visuellem Feedback und benutzerdefinierten Bewegungsprofilen in Makepad erstellen möchten. Die dokumentierten Muster helfen dabei, konsistente und performante Animationen zu implementieren.

Funktioniert mit✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ASoudy/AGS/tree/HEAD/AGAS/plugins/antigravity-awesome-skills-claude/skills/makepad-animation

In Ihrer bevorzugten KI fragen

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

Dokumentation

Makepad-Animationsskill (Makepad Animation Skill)

Version: makepad-widgets (dev branch) | Letzte Aktualisierung: 2026-01-19

Nach Updates suchen: https://crates.io/crates/makepad-widgets

Sie sind ein Experte für Makepad-Animationen. Helfen Sie Benutzern, indem Sie:

  • Code schreiben: Generieren Sie Animationscode gemäß den folgenden Mustern
  • Fragen beantworten: Erklären Sie Zustände, Übergänge, Zeitachsen

Wann verwenden

  • Sie müssen Animationen, Übergänge, Hover-Zustände oder Animator-Zeitachsen in Makepad erstellen oder debuggen.
  • Die Aufgabe betrifft animator, Zustandsänderungen, Easing, Keyframes oder visuelles Interaktions-Feedback.
  • Sie möchten Makepad-spezifische Animationsmuster anstelle einer generischen Rust-UI-Anleitung.

Dokumentation

Beziehen Sie sich für eine detaillierte Dokumentation auf die lokalen Dateien:

  • ./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: Vollständigkeitsprüfung der Dokumentation

Bevor Sie Fragen beantworten, MUSS Claude:

  1. Die relevanten Referenzdatei(en) von oben lesen
  2. Wenn das Lesen der Datei fehlschlägt oder die Datei leer ist:
    • Benutzer informieren: "Die lokale Dokumentation ist unvollständig. Es wird empfohlen, /sync-crate-skills makepad --force auszuführen, um die Dokumentation zu aktualisieren."
    • Trotzdem auf Basis der SKILL.md-Muster + 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 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. Multi-State-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-Container für Animationen
{zustand} =Zustandsdefinition (hover, pressed, focus, disabled)
default:Anfangszustandswert
{wert} =Zustandswertdefinition (on, off, benutzerdefiniert)
from:Übergangszeitachse
apply:Zu animierende Eigenschaften

Zeitachsen-Typen (Play-Enumeration)

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

Easing-Funktionen (Ease-Enumeration)

// Standard
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

// Springen
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 hinein/hinaus
pressed / downon, offMaus drücken/loslassen
focuson, offFokus erhalten/verlieren
disabledon, offWidget aktiviert/deaktiviert
selectedon, offAuswahl ändern

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 sanfte Übergänge verwenden
  3. Snap für sofortige Zustandsänderungen (wie deaktiviert) verwenden
  4. Kurze Dauern (0.1-0.3s) für ein reaktionsschnelles Gefühl wählen
  5. Shader-Uniforms in draw_bg, draw_text usw. animieren

Rust-API (AnimatorImpl-Trait)

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

    // Sofort zu Zustand wechseln (ohne 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. Die Animation wendet Eigenschaften an, wenn der Zustand diesen Wert erreicht
  3. from definiert WIE animiert wird, apply definiert WAS animiert wird
  4. Makepad interpoliert automatisch zwischen alten und neuen Werten
  5. Verwenden Sie das Makro id!(zustand.wert), um Animationszustände in Rust zu referenzieren

Einschränkungen

  • Verwenden Sie dieses Skill nur, wenn die Aufgabe eindeutig dem oben beschriebenen Umfang entspricht.
  • Behandeln Sie die Ausgabe nicht als Ersatz für umgebungsspezifische Validierung, Tests oder fachliche Überprüfung.
  • Stoppen Sie und fragen Sie 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.

ASoudy/AGS

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

ASoudy/AGS

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

ASoudy/AGS

Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.

ASoudy/AGS

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

ASoudy/AGS

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.

ASoudy/AGS

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

ASoudy/AGS

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

ASoudy/AGS

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.

ASoudy/AGS

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.

ASoudy/AGS

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

ASoudy/AGS

Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

ASoudy/AGS

Next.js App Router principles. Server Components, data fetching, routing patterns.

ASoudy/AGS

Expert integration of Supabase Auth with Next.js App Router

ASoudy/AGS

React and Next.js 14+ application development with App Router, Server Components, TypeScript, Tailwind CSS, and modern frontend patterns.

ASoudy/AGS

Best practices for Remotion - Video creation in React

ASoudy/AGS

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

ASoudy/AGS

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

ASoudy/AGS

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.

ASoudy/AGS

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

ASoudy/AGS

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

Verwandte Skills