What problem does it solve?
This Skill simplifies complex animation logic by providing a suite of powerful utility functions for data manipulation, math operations, and common animation tasks, making your GSAP code cleaner and more efficient.
Core Features & Use Cases
- Math & Data Helpers: Utilize functions like
clamp, mapRange, normalize, random, wrap, interpolate, and pipe for precise control over values.
- Array & Selector Utilities: Easily convert array-likes with
toArray, distribute values with distribute, or create scoped selectors with selector.
- Unit Manipulation: Extract units with
getUnit or add them with unitize.
- Use Case: Dynamically adjust animation properties based on scroll position, mouse movement, or other real-time inputs with functions like
mapRange and clamp.
Quick Start
Use the gsap-utilities skill to map a scroll progress value between 0 and 1 to an x-translation between 0 and 500 pixels.