Skillpedia
المواقع والواجهات (frontend)48k · #5139

makepad-2-0-animation

ما الذي تفعله

تساعد هذه المهارة على إنشاء الرسوم المتحركة في واجهات المستخدم باستخدام مكتبة Makepad. تتيح للعناصر أن تغيّر مظهرها مع الوقت، مع تأثيرات مثل حالات التمرير بالمؤشر والانتقالات والحركات المستمرة.

متى تستخدمها

  • ✓عندما تريد أن يتغير لون زر عند النقر عليه.
  • ✓عندما تريد أن يظهر عنصر تدريجيًا بسلاسة.
  • ✓عندما تريد إنشاء تأثير تحميل متحرك.

رابط المهارة

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/makepad-2-0-animation/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/makepad-2-0-animation/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“كيف أجعل زرًا يغيّر لونه عندما يمر المؤشر فوقه؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تحدد «animator» لعنصر. هذا animator يتحكم في كيفية تغيّر الخصائص البصرية (مثل اللون أو الحجم) بين «الحالات» المختلفة (مثل «عادي» و«hover») باستخدام توقيتات وتأثيرات محددة.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

When to Use

  • Use when this upstream workflow matches the user's stated goal.
  • Use when the task requires the procedures documented in this skill.

Makepad 2.0 Animation Skill

Version: makepad-widgets (dev branch) | Last Updated: 2026-03-03

Overview

The Animator system drives instance() shader variables over time, enabling hover effects, transitions, and looping animations. It uses independent animation tracks called "groups" that run simultaneously.

Documentation

Refer to the local files for detailed documentation:

  • ./references/animator-reference.md - Complete Animator API, play types, ease functions, examples

IMPORTANT: Documentation Completeness Check

Before answering questions, Claude MUST:

  1. Read the relevant reference file(s) listed above
  2. If file read fails or file is empty:
    • Inform user: "Reference docs incomplete. Still answering based on SKILL.md patterns."
    • Still answer based on SKILL.md patterns + built-in knowledge
  3. If reference file exists, incorporate its content into the answer

Critical: Widget Animator Support

NOT all widgets support animator! Adding animator: Animator{...} to an unsupported widget is silently ignored - no error, no animation, nothing happens.

Widgets that SUPPORT Animator

View, SolidView, RoundedView, ScrollXView, ScrollYView, ScrollXYView, Button, ButtonFlat, ButtonFlatter, CheckBox, Toggle, RadioButton, LinkLabel, TextInput

Widgets that DO NOT Support Animator

Label, H1-H4, P, TextBox, Image, Icon, Markdown, Html, Slider, DropDown, Splitter, Hr, Filler

To animate a Label: Wrap it in a View with the animator:

View{
    width: Fit height: Fit
    animator: Animator{
        hover: {
            default: @off
            off: AnimatorState{ from: {all: Forward {duration: 0.15}} apply: {draw_bg: {hover: 0.0}} }
            on: AnimatorState{ from: {all: Forward {duration: 0.15}} apply: {draw_bg: {hover: 1.0}} }
        }
    }
    label := Label{text: "Animated via parent"}
}

Animator Structure

animator: Animator{
    <group_name>: {
        default: @<state_name>
        <state_name>: AnimatorState{
            from: { ... }
            ease: <EaseFunction>
            redraw: true
            apply: { ... }
        }
        <state_name>: AnimatorState{ ... }
    }
    <group_name>: { ... }
}

Groups

Each group is an independent animation track. Common groups:

Group Purpose Typical States
hover Mouse hover in/out off, on
focus Keyboard focus off, on
active Toggled/checked state off, on
disabled Disabled state off, on
time Continuous looping off, on

Multiple groups animate simultaneously without interfering.


The from Block

Controls transition timing. Keys are states being transitioned FROM, or all as catch-all.

// From any state, animate over 0.2 seconds
from: {all: Forward {duration: 0.2}}

// Instant from any state
from: {all: Snap}

// Different timing depending on origin
from: {
    all: Forward {duration: 0.1}
    down: Forward {duration: 0.01}
}

Play Types

Type Description Example
Forward {duration: 0.2} One-shot forward Hover transitions
Snap Instant jump, no animation Default state initialization
Loop {duration: 1.0} Looping animation Loading spinners
ReverseLoop {duration: 1.0} Ping-pong loop Pulsing effects
BounceLoop {duration: 1.0} Bounce back and forth Bouncing animations

Ease Functions

Function Description
Linear Constant speed
InQuad / OutQuad / InOutQuad Quadratic easing
InCubic / OutCubic / InOutCubic Cubic easing
InQuart / OutQuart / InOutQuart Quartic easing
InQuint / OutQuint / InOutQuint Quintic easing
InSine / OutSine / InOutSine Sine easing
InExp / OutExp / InOutExp Exponential easing
InCirc / OutCirc / InOutCirc Circular easing
InElastic / OutElastic / InOutElastic Elastic spring
InBack / OutBack / InOutBack Overshoot
InBounce / OutBounce / InOutBounce Bounce

Usage: ease: OutCubic in the AnimatorState (optional, defaults to Linear).


The apply Block

…

الأسئلة الشائعة

هل يمكن تحريك كل العناصر؟

لا. بعض العناصر مثل «View» و«Button» تدعم الحركة، بينما عناصر مثل «Label» و«Image» لا تدعمها مباشرة. لتحريك «Label»، تحتاج إلى وضعه داخل «View» قابل للتحريك.

ما هي «المجموعات» (groups) في الرسوم المتحركة؟

المجموعات مسارات حركة مستقلة يمكن أن تحدث في الوقت نفسه. أمثلتها الشائعة «hover» (للمؤشر)، و«focus» (عند تحديد العنصر)، و«time» (للحركات المستمرة).

كيف أجعل الحركة أسرع أو أبطأ؟

يمكنك ضبط «المدة» (duration) للانتقال بالثواني. ويمكنك أيضًا اختيار «دوال التخفيف» (ease functions) التي تتحكم في سرعة الحركة في نقاط مختلفة، مثل البدء ببطء ثم التسارع، أو العكس.

التفاصيل

الوصف الأصلي من المؤلف

Makepad 2.0 guidance for animation; use when building or debugging Makepad UI code.

repo: sickn33/agentic-awesome-skills

الشعبية

نجوم GitHub
48k
الترتيب
#5139
الترخيص
MIT
آخر تحديث
15‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة