Communitygithub.com

AbobakrDiara61/railway-system

Makepad 애니메이션 시스템을 구현하는 핵심 스킬입니다. 호버, 프레스, 포커스, 비활성화 상태와 같은 UI 상호작용 애니메이션을 손쉽게 작성할 수 있습니다.

railway-system란 무엇인가요?

이 스킬은 Makepad UI 프레임워크에서 애니메이션을 다루기 위한 완전한 가이드를 제공합니다. 마우스 호버, 프레스, 포커스, 비활성화 등 다양한 UI 상태 전환에 대해 `animator` 블록을 사용한 애니메이션 패턴을 포함합니다. 각 상태는 `default` 값과 `from` (타임라인), `apply` (속성)으로 구성되며, `Forward`, `Snap`, `Loop`, `BounceLoop` 등의 재생 유형을 지원합니다. 또한 20개 이상의 이징 함수(Linear, InOutQuad, Elastic 등)를 제공하여 다양한 애니메이션 효과를 구현할 수 있습니다. Rust API를 통해 `animator_play`, `animator_cut`, `animator_in_state` 메서드로 직접 상태를 제어할 수 있으며, 클라이언트 코드와 Makepad 마크업 간의 긴밀한 통합을 지원합니다.

지원 대상✓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, 사용자 정의)
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.3s) 유지하세요.
  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. id!(state.value) 매크로를 사용하여 Rust에서 애니메이션 상태를 참조하세요.

제한 사항

  • 위에서 설명한 범위에 작업이 명확하게 해당하는 경우에만 이 스킬을 사용하세요.
  • 출력물을 환경별 검증, 테스트 또는 전문가 검토의 대체물로 취급하지 마세요.
  • 필요한 입력, 권한, 안전 경계 또는 성공 기준이 누락된 경우 중단하고 명확히 요청하세요.

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

관련 스킬