gsap-performance

Optimizes GSAP animations for smooth 60fps rendering using transforms, will-change, and batching.

1|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/MARUCIE/openclaw-foundry --skill gsap-performance-marucie
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gsap-performance
Source: https://github.com/MARUCIE/openclaw-foundry/tree/main/web/public/packs/frontend-engineer/skills/frontend/gsap-performance
Command: npx skills add https://github.com/MARUCIE/openclaw-foundry --skill gsap-performance-marucie

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? GSAP animations often suffer from jank, dropped frames, and layout thrashing when they animate layout-heavy properties like width, height, top, or left. This Skill diagnoses those performance problems and rewrites animations to run on the compositor thread for smooth 60fps playback, even on low-end devices. ## Core Features & Use Cases - Compositor-Friendly Animation: Replaces layout-triggering properties (width, height, top, left, margin, padding) with GPU-accelerated transforms (x, y, scale, rotation) and opacity. - Efficient Update Patterns: Applies will-change hints only where needed, uses gsap.quickTo() for frequently updated properties like mouse followers, and batches reads/writes to avoid layout thrashing. - ScrollTrigger & Timeline Optimization: Consolidates scattered tweens into timelines, tunes scrub and pin settings, and debounces ScrollTrigger.refresh() calls. - Use Case: A landing page with a laggy scroll-driven hero animation and a jittery mouse-follower cursor gets refactored so both run at a stable 60fps on mid-range phones. ## Quick Start Ask the assistant to review your GSAP animation code and optimize it for 60fps performance by replacing layout properties with transforms and opacity.

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 thread and skip layout and paint. Avoid animating width, height, top, left, margin, or padding, since those trigger layout recalculation and cause jank.

Why is my GSAP animation laggy or dropping frames?▼

Lag usually comes from animating layout-heavy properties, interleaving DOM reads and writes, or running hundreds of simultaneous tweens. Switch to transforms, batch reads before writes, use stagger instead of many separate tweens, and kill off-screen animations.

Should I use will-change on every animated element?▼

No. Apply will-change: transform only to elements that are actually animating, and remove it when done. Setting it everywhere wastes memory and can hurt performance instead of helping.

How do I optimize a GSAP mouse follower animation?▼

Use gsap.quickTo() for x and y instead of creating a new tween on every mousemove event. quickTo reuses a single tween instance, which avoids the overhead of repeatedly constructing tweens on high-frequency updates.

When should I call ScrollTrigger.refresh()?▼

Call ScrollTrigger.refresh() only when the page layout actually changes, such as after content or images load. Do not call it on every resize event; debounce it when possible to avoid unnecessary recalculation work.