본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)101k · #1181

gsap-performance

하는 일

이 도구는 웹사이트의 애니메이션을 더 빠르고 부드럽게 만들어서, 끊기거나 느려지지 않도록 돕습니다. 성능이 낮은 컴퓨터에서도 초당 60프레임으로 실행되도록 하는 최선의 기법을 알려 줍니다.

사용하는 경우

  • ✓웹사이트 애니메이션이 끊기지 않고 실행되기를 원할 때.
  • ✓복잡한 애니메이션을 만들면서 부드럽게 유지하고 싶을 때.
  • ✓애니메이션을 더 빠르거나 부드럽게 만드는 방법을 누군가 물어볼 때.

스킬 링크

https://github.com/nexu-io/open-design/blob/main/skills/gsap-performance/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/nexu-io/open-design/blob/main/skills/gsap-performance/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“GSAP 애니메이션을 60fps로 실행하려면 어떻게 하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

브라우저가 더 쉽게 애니메이션하는 ‘transform’이나 ‘opacity’ 같은 속성을 사용하라고 제안합니다. 애니메이션을 느리게 만들 수 있는 다른 속성은 피하도록 합니다. 또한 동작을 묶고, 애니메이션마다 브라우저가 할 일을 줄이는 요령을 가르쳐 줍니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

GSAP Performance

Curated from GreenSock's official GSAP skills: https://github.com/greensock/gsap-skills

When to Use This Skill

Apply when optimizing GSAP animations for smooth 60fps, reducing layout/paint cost, or when the user asks about performance, jank, or best practices for fast animations.

Related skills: Build animations with gsap-core (transforms, autoAlpha) and gsap-timeline; for ScrollTrigger performance see gsap-scrolltrigger.

Prefer Transform and Opacity

Animating transform (x, y, scaleX, scaleY, rotation, rotationX, rotationY, skewX, skewY) and opacity keeps work on the compositor and avoids layout and most paint. Avoid animating layout-heavy properties when a transform can achieve the same effect.

  • ✅ Prefer: x, y, scale, rotation, opacity.
  • ❌ Avoid when possible: width, height, top, left, margin, padding (they trigger layout and can cause jank).

GSAP’s x and y use transforms (translate) by default; use them instead of left/top for movement.

will-change

Use will-change in CSS on elements that will animate. It hints the browser to promote the layer.

will-change: transform;

Batch Reads and Writes

GSAP batches updates internally. When mixing GSAP with direct DOM reads/writes or layout-dependent code, avoid interleaving reads and writes in a way that causes repeated layout thrashing. Prefer doing all reads first, then all writes (or let GSAP handle the writes in one go).

Many Elements (Stagger, Lists)

  • Use stagger instead of many separate tweens with manual delays when the animation is the same; it’s more efficient.
  • For long lists, consider virtualization or animating only visible items; avoid creating hundreds of simultaneous tweens if it causes jank.
  • Reuse timelines where possible; avoid creating new timelines every frame.

Frequently updated properties (e.g. mouse followers)

Prefer gsap.quickTo() for properties that are updated often (e.g. mouse-follower x/y). It reuses a single tween instead of creating new tweens on each update.

let xTo = gsap.quickTo("#id", "x", { duration: 0.4, ease: "power3" }),
    yTo = gsap.quickTo("#id", "y", { duration: 0.4, ease: "power3" });

document.querySelector("#container").addEventListener("mousemove", (e) => {
  xTo(e.pageX);
  yTo(e.pageY);
});

ScrollTrigger and Performance

  • pin: true promotes the pinned element; pin only what’s needed.
  • scrub with a small value (e.g. scrub: 1) can reduce work during scroll; test on low-end devices.
  • Call ScrollTrigger.refresh() only when layout actually changes (e.g. after content load), not on every resize; debounce when possible.

Reduce Simultaneous Work

  • Pause or kill off-screen or inactive animations when they’re not visible (e.g. when the user navigates away).
  • Avoid animating huge numbers of properties on many elements at once; simplify or sequence if needed.

Best practices

  • ✅ Animate transform and opacity; use will-change in CSS only on elements that animate.
  • ✅ Use stagger instead of many separate tweens with manual delays when the animation is the same.
  • ✅ Use gsap.quickTo() for frequently updated properties (e.g. mouse followers).
  • ✅ Clean up or kill off-screen animations; call ScrollTrigger.refresh() when layout changes, debounced when possible.

Do Not

  • ❌ Animate width/ height/ top/ left for movement when x/ y/ scale can achieve the same look.
  • ❌ Set will-change or force3D on every element “just in case”; use for elements that are actually animating.
  • ❌ Create hundreds of overlapping tweens or ScrollTriggers without testing on low-end devices.
  • ❌ Ignore cleanup; stray tweens and ScrollTriggers keep running and can hurt performance and correctness.
자주 묻는 질문

‘레이아웃 스래싱’이란 무엇인가요?

브라우저가 화면에 있는 많은 요소의 위치와 크기를 반복해서 다시 계산해야 하는 상황입니다. 이 때문에 애니메이션이 느려집니다.

‘will-change’란 무엇인가요?

브라우저에 ‘이 요소가 곧 바뀔 것이다’라고 알려 주는 힌트로, 브라우저가 더 효율적으로 애니메이션을 준비하도록 돕습니다.

왜 ‘width’와 ‘height’는 애니메이션하지 않아야 하나요?

요소의 너비나 높이를 바꾸면 브라우저가 다른 요소의 위치를 다시 계산해야 해서, 더 많은 자원을 쓰고 속도가 느려질 수 있기 때문입니다.

상세 정보

작성자의 원본 설명

Official GSAP skill for performance — prefer transforms, avoid layout thrashing, will-change, batching. Use when optimizing GSAP animations, reducing jank, or when the user asks about animation performance, FPS, or smooth 60fps.

repo: nexu-io/open-design

인기도

GitHub 스타
101k
순위
#1181
라이선스
Apache-2.0
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬