gsap-performance

Optimizes GSAP animations for smooth 60fps rendering using transforms and batching.

Updated Sep 1, 2026
One-click install
npx skills add https://github.com/zamansepeti43/c-rak-agent --skill gsap-performance-zamansepeti43
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gsap-performance
Source: https://github.com/zamansepeti43/c-rak-agent/tree/main/video-engine/.agents/skills/gsap-performance
Command: npx skills add https://github.com/zamansepeti43/c-rak-agent --skill gsap-performance-zamansepeti43

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? GSAP animations can cause jank, dropped frames, and layout thrashing when they animate layout-heavy properties or create too many simultaneous tweens. This Skill provides concrete rules and patterns to keep animations on the compositor thread and running at 60fps. ## Core Features & Use Cases - Compositor-Friendly Properties: Enforces animating transform and opacity instead of width, height, top, or left to avoid layout and paint costs. - Efficient Update Patterns: Recommends gsap.quickTo() for frequently updated properties like mouse followers, and stagger instead of many manual tweens. - ScrollTrigger Tuning: Covers pin promotion, scrub values, and debounced ScrollTrigger.refresh() calls to reduce scroll-related work. - Use Case: A developer notices a page with scroll-driven animations stutters on mobile. Apply this Skill to replace left/top animations with x/y, add will-change only to animating elements, and debounce ScrollTrigger.refresh() calls. ## Quick Start Review my GSAP animation code and optimize it for 60fps performance by fixing layout-thrashing properties and tween creation patterns.

Frequently Asked Questions about gsap-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make GSAP animations run at 60fps?

Animate only transform properties (x, y, scale, rotation) and opacity, which stay on the compositor and avoid layout and paint. Add will-change: transform in CSS only to elements that actually animate, and avoid animating width, height, top, or left.

What is gsap.quickTo() and when should I use it?

gsap.quickTo() creates a single reusable tween for properties updated frequently, such as mouse-follower x/y positions. It avoids creating a new tween on every mousemove event, reducing overhead for continuously changing values.

Why does my GSAP animation cause layout thrashing?

Layout thrashing happens when you animate layout-triggering properties like width, height, top, left, margin, or padding, or when you interleave DOM reads and writes. Use x/y transforms instead and batch all reads before writes.

Should I use will-change on every animated element?

No. Apply will-change only to elements that are actually animating, since it promotes elements to their own compositor layer and consumes memory. Setting it on every element just in case wastes resources and can hurt performance.

How do I optimize ScrollTrigger performance in GSAP?

Pin only the elements that need it, use a small scrub value like scrub: 1 to reduce scroll work, and call ScrollTrigger.refresh() only when layout actually changes, debounced where possible. Kill or pause off-screen ScrollTriggers when not visible.