GSAP Utilities
gsap_utilitiesGenerate GSAP utility code for math operations, range mapping, and DOM helpers. Use for interpolation, clamping, wrapping, snapping, and scoped selection.
Instructions
Generate code using GSAP utility functions for math, range mapping, and DOM helpers. Use for value interpolation, clamping, wrapping, snapping, and scoped DOM selection within animation logic. Not for generating animations — use gsap_tween or gsap_timeline for that.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | Yes | The GSAP utility method to generate | |
| params | Yes | Method-specific parameters (keys vary by method): interpolate → {start, end, progress}; mapRange → {inMin, inMax, outMin, outMax, value}; clamp → {min, max, value}; wrap → {min, max, value} or {array, index}; wrapYoyo → {min, max, value}; distribute → {amount, base?, from?, ease?}; random → {min, max, snap?}; snap → {snap, value} or {array, value}; normalize → {min, max, value}; pipe → {functions: string[]}; unitize → {func, unit}; toArray → {selector}; selector → {scope}; shuffle → {array} | |
| example | No | Include usage example comment |