
gsap-utils
Pure utility functions for math, value mapping, randomization, array handling
by greensockFree
Description
gsap-utils is a GreenSock skill for the gsap.utils helpers, which are pure functions for math, array handling, unit parsing and value mapping in GSAP code. The skill covers more than 15 helpers, including clamp, mapRange, normalize, interpolate, random, snap, toArray, wrap and pipe, which transform values inside tweens and callbacks. The helpers need no registration and are called on gsap.utils, such as gsap.utils.clamp(). Many of them take the value to transform as their last argument, and if you leave that argument out, the helper returns a function you can call on values later. The function form is useful when you clamp, map, normalize or snap many values with the same settings, for example in a mousemove handler. The skill is meant for code that maps scroll positions to values, randomizes, snaps to a grid or normalizes inputs. It works alongside gsap-core, gsap-timeline and gsap-scrolltrigger, and it points out that CustomEase and other easing utilities are covered by the gsap-plugins skill. It is installed with npx skills from the greensock/gsap-skills repository, and its security audits all pass.…
Highlights
- Math helpers including clamp, mapRange, normalize and interpolate
- Randomization, snapping and wrapping
- Array helpers such as toArray and pipe
- Function form for reusing the same settings
- Works with gsap-core, gsap-timeline and gsap-scrolltrigger
Ratings & Reviews
No ratings yet
Be the first to rate gsap-utils.
People also visit
gsap-utils FAQ
What are the gsap.utils helpers?
Pure functions for math, value mapping, randomization, arrays and unit parsing in GSAP code.
Do I need to register them?
No. They are available on gsap.utils, for example gsap.utils.clamp().
What is the function form?
When you leave out the value argument, the helper returns a function you can call on values later.
What is the skill for?
Code that maps scroll to a value, randomizes, snaps to a grid or normalizes inputs.
Where are CustomEase and the easing utilities?
The skill says they are in the gsap-plugins skill.
How do I install it?
Run npx skills add https://github.com/greensock/gsap-skills --skill gsap-utils.
What are the best gsap-utils alternatives?
Popular alternatives to gsap-utils include gsap-performance, hyperframes-animation and gsap-frameworks. See all gsap-utils alternatives










