Communitygithub.com

Makepad 애니메이션 스킬

Makepad 애니메이션 시스템을 위한 전문 스킬입니다. 호버, 프레스, 포커스, 비활성화 상태 전환 및 애니메이터 타임라인을 포함한 애니메이션 코드를 생성하고 디버깅합니다.

Makepad 애니메이션 스킬란 무엇인가요?

이 스킬은 Makepad UI 프레임워크의 애니메이션 시스템 구축 및 디버깅을 전문으로 다룹니다. Rust 기반 UI 라이브러리인 Makepad에서 상태 머신을 활용한 애니메이션을 정의하는 방법을 제공합니다. 주요 기능으로는 호버(hover), 눌림(pressed), 포커스(focus), 비활성화(disabled), 선택(selected) 상태에 대한 애니메이션 패턴을 포함하며, 각 상태는 독립적으로 동시에 활성화될 수 있습니다. Forward, Snap, Reverse, Loop, BounceLoop 등 다양한 타임라인 유형과 Linear, InOutQuad, OutBounce 등 20개 이상의 이징 함수를 지원하여 부드럽고 반응성 있는 UI 인터랙션을 구현할 수 있습니다. 또한 Rust API를 통해 `animator_play()`와 `animator_cut()` 메서드로 애니메이션 상태를 프로그래매틱하게 제어할 수 있는 AnimatorImpl 트레이트를 제공합니다. 이 스킬은 makepad-widgets(dev 브랜치)를 기준으로 하며, Claude AI가 애니메이션 관련 질문에 답하거나 코드를 생성할 때 적절한 패턴과 문서를 참조하여 정확한 구현을 도와줍니다.

지원 대상✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ASoudy/AGS/tree/HEAD/AGAS/plugins/antigravity-awesome-skills-claude/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, 사용자 정의)
from:전환 타임라인
apply:애니메이션할 속성

타임라인 유형 (Play 열거형)

유형설명
Forward { duration: f64 }선형 순방향 애니메이션
Snap즉시 변경, 전환 없음
Reverse { duration: f64, end: f64 }역방향 애니메이션
Loop { duration: f64, end: f64 }반복 애니메이션
BounceLoop { duration: f64, end: f64 }바운스 반복 애니메이션

이징 함수 (Ease 열거형)

// 기본
Linear

// 2차
InQuad, OutQuad, InOutQuad

// 3차
InCubic, OutCubic, InOutCubic

// 4차
InQuart, OutQuart, InOutQuart

// 5차
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.

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.

관련 스킬