├── .gitignore ├── README.md ├── SECURITY.md ├── dist ├── CSSRulePlugin.js ├── CSSRulePlugin.min.js ├── CSSRulePlugin.min.js.map ├── CustomBounce.js ├── CustomBounce.min.js ├── CustomBounce.min.js.map ├── CustomEase.js ├── CustomEase.min.js ├── CustomEase.min.js.map ├── CustomWiggle.js ├── CustomWiggle.min.js ├── CustomWiggle.min.js.map ├── Draggable.js ├── Draggable.min.js ├── Draggable.min.js.map ├── DrawSVGPlugin.js ├── DrawSVGPlugin.min.js ├── DrawSVGPlugin.min.js.map ├── EasePack.js ├── EasePack.min.js ├── EasePack.min.js.map ├── EaselPlugin.js ├── EaselPlugin.min.js ├── EaselPlugin.min.js.map ├── Flip.js ├── Flip.min.js ├── Flip.min.js.map ├── GSDevTools.js ├── GSDevTools.min.js ├── GSDevTools.min.js.map ├── InertiaPlugin.js ├── InertiaPlugin.min.js ├── InertiaPlugin.min.js.map ├── MorphSVGPlugin.js ├── MorphSVGPlugin.min.js ├── MorphSVGPlugin.min.js.map ├── MotionPathHelper.js ├── MotionPathHelper.min.js ├── MotionPathHelper.min.js.map ├── MotionPathPlugin.js ├── MotionPathPlugin.min.js ├── MotionPathPlugin.min.js.map ├── Observer.js ├── Observer.min.js ├── Observer.min.js.map ├── Physics2DPlugin.js ├── Physics2DPlugin.min.js ├── Physics2DPlugin.min.js.map ├── PhysicsPropsPlugin.js ├── PhysicsPropsPlugin.min.js ├── PhysicsPropsPlugin.min.js.map ├── PixiPlugin.js ├── PixiPlugin.min.js ├── PixiPlugin.min.js.map ├── ScrambleTextPlugin.js ├── ScrambleTextPlugin.min.js ├── ScrambleTextPlugin.min.js.map ├── ScrollSmoother.js ├── ScrollSmoother.min.js ├── ScrollSmoother.min.js.map ├── ScrollToPlugin.js ├── ScrollToPlugin.min.js ├── ScrollToPlugin.min.js.map ├── ScrollTrigger.js ├── ScrollTrigger.min.js ├── ScrollTrigger.min.js.map ├── SplitText.js ├── SplitText.min.js ├── SplitText.min.js.map ├── TextPlugin.js ├── TextPlugin.min.js ├── TextPlugin.min.js.map ├── all.js ├── gsap.js ├── gsap.min.js └── gsap.min.js.map ├── esm ├── CSSPlugin.js ├── CSSRulePlugin.js ├── CustomBounce.js ├── CustomEase.js ├── CustomWiggle.js ├── Draggable.js ├── DrawSVGPlugin.js ├── EasePack.js ├── EaselPlugin.js ├── Flip.js ├── GSDevTools.js ├── InertiaPlugin.js ├── MorphSVGPlugin.js ├── MotionPathHelper.js ├── MotionPathPlugin.js ├── Observer.js ├── Physics2DPlugin.js ├── PhysicsPropsPlugin.js ├── PixiPlugin.js ├── ScrambleTextPlugin.js ├── ScrollSmoother.js ├── ScrollToPlugin.js ├── ScrollTrigger.js ├── SplitText.js ├── TextPlugin.js ├── all.js ├── gsap-core.js ├── index.js └── utils │ ├── PathEditor.js │ ├── VelocityTracker.js │ ├── matrix.js │ ├── paths.js │ └── strings.js ├── package.json ├── src ├── CSSPlugin.js ├── CSSRulePlugin.js ├── CustomBounce.js ├── CustomEase.js ├── CustomWiggle.js ├── Draggable.js ├── DrawSVGPlugin.js ├── EasePack.js ├── EaselPlugin.js ├── Flip.js ├── GSDevTools.js ├── InertiaPlugin.js ├── MorphSVGPlugin.js ├── MotionPathHelper.js ├── MotionPathPlugin.js ├── Observer.js ├── Physics2DPlugin.js ├── PhysicsPropsPlugin.js ├── PixiPlugin.js ├── ScrambleTextPlugin.js ├── ScrollSmoother.js ├── ScrollToPlugin.js ├── ScrollTrigger.js ├── SplitText.js ├── SplitText.ts ├── TextPlugin.js ├── all.js ├── gsap-core.js ├── index.js └── utils │ ├── PathEditor.js │ ├── VelocityTracker.js │ ├── matrix.js │ ├── paths.js │ └── strings.js └── types ├── animation.d.ts ├── css-plugin.d.ts ├── css-rule-plugin.d.ts ├── custom-bounce.d.ts ├── custom-ease.d.ts ├── custom-wiggle.d.ts ├── draggable.d.ts ├── draw-svg-plugin.d.ts ├── ease.d.ts ├── easel-plugin.d.ts ├── flip.d.ts ├── gs-dev-tools.d.ts ├── gsap-core.d.ts ├── gsap-plugins.d.ts ├── gsap-utils.d.ts ├── index.d.ts ├── inertia-plugin.d.ts ├── morph-svg-plugin.d.ts ├── motion-path-helper.d.ts ├── motion-path-plugin.d.ts ├── observer.d.ts ├── physics-2d-plugin.d.ts ├── physics-props-plugin.d.ts ├── pixi-plugin.d.ts ├── scramble-text-plugin.d.ts ├── scroll-smoother.d.ts ├── scroll-to-plugin.d.ts ├── scroll-trigger.d.ts ├── split-text.d.ts ├── text-plugin.d.ts ├── timeline.d.ts ├── tween.d.ts └── utils └── velocity-tracker.d.ts /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .AppleDouble 3 | .LSOverride 4 | Icon 5 | 6 | # Thumbnails 7 | ._* 8 | 9 | # Files that might appear on external disk 10 | .Spotlight-V100 11 | .Trashes 12 | 13 | # Windows image file caches 14 | Thumbs.db 15 | ehthumbs.db 16 | 17 | # Folder config file 18 | Desktop.ini 19 | 20 | # Recycle Bin used on file shares 21 | $RECYCLE.BIN/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GSAP (GreenSock Animation Platform) 2 | 3 | [![GSAP - Animate anything](https://gsap.com/GSAP-share-image.png)](http://gsap.com) 4 | 5 | GSAP is a **framework-agnostic** JavaScript animation library that turns developers into animation superheroes. Build high-performance animations that work in **every** major browser. Animate CSS, SVG, canvas, React, Vue, WebGL, colors, strings, motion paths, generic objects...anything JavaScript can touch! GSAP's ScrollTrigger plugin delivers jaw-dropping scroll-based animations with minimal code. gsap.matchMedia() makes building responsive, accessibility-friendly animations a breeze. 6 | 7 | No other library delivers such advanced sequencing, reliability, and tight control while solving real-world problems on over 12 million sites. GSAP works around countless browser inconsistencies; your animations ***just work***. At its core, GSAP is a high-speed property manipulator, updating values over time with extreme accuracy. It's up to 20x faster than jQuery! 8 | 9 | GSAP is completely flexible; sprinkle it wherever you want. **Zero dependencies.** 10 | 11 | There are many optional plugins and easing functions for achieving advanced effects easily like scrolling, morphing, [text splitting](https://gsap.com/docs/v3/Plugins/SplitText), animating along a motion path or FLIP animations. There's even a handy Observer for normalizing event detection across browsers/devices. 12 | 13 | 14 | ### Get Started 15 | 16 | [![Get Started with GSAP](http://gsap.com/_img/github/get-started.jpg)](http://gsap.com/get-started) 17 | 18 | 19 | ## Docs & Installation 20 | 21 | View the full documentation here, including an installation guide. 22 | 23 | ### CDN 24 | 25 | ```html 26 | 27 | ``` 28 | 29 | See JSDelivr's dedicated GSAP page for quick CDN links to the core files/plugins. There are more installation instructions at gsap.com. 30 | 31 | **Every major ad network excludes GSAP from file size calculations** and most have it on their own CDNs, so contact them for the appropriate URL(s). 32 | 33 | ### NPM 34 | See the guide to using GSAP via NPM here. 35 | 36 | ```javascript 37 | npm install gsap 38 | ``` 39 | 40 | GSAP's core can animate almost anything including CSS and attributes, plus it includes all of the utility methods like interpolate(), mapRange(), most of the eases, and it can do snapping and modifiers. 41 | 42 | ```javascript 43 | // typical import 44 | import gsap from "gsap"; 45 | 46 | // get other plugins: 47 | import ScrollTrigger from "gsap/ScrollTrigger"; 48 | import Flip from "gsap/Flip"; 49 | import Draggable from "gsap/Draggable"; 50 | 51 | // or all tools are exported from the "all" file (excluding members-only plugins): 52 | import { gsap, ScrollTrigger, Draggable, MotionPathPlugin } from "gsap/all"; 53 | 54 | // don't forget to register plugins 55 | gsap.registerPlugin(ScrollTrigger, Draggable, Flip, MotionPathPlugin); 56 | ``` 57 | 58 | The NPM files are ES modules, but there's also a /dist/ directory with UMD files for extra compatibility. 59 | 60 | ## GSAP is FREE! 61 | 62 | Thanks to [Webflow](https://webflow.com), GSAP is now **100% FREE** including ALL of the bonus plugins like [SplitText](https://gsap.com/docs/v3/Plugins/SplitText), [MorphSVG](https://gsap.com/docs/v3/Plugins/MorphSVGPlugin), and all the others that were exclusively available to Club GSAP members. That's right - the entire GSAP toolset is FREE, even for commercial use! 🤯 Read more [here](https://webflow.com/blog/gsap-becomes-free) 63 | 64 | ### ScrollTrigger & ScrollSmoother 65 | 66 | If you're looking for scroll-driven animations, GSAP's ScrollTrigger plugin is the standard. There's a companion ScrollSmoother as well. 67 | 68 | [![ScrollTrigger](http://gsap.com/_img/github/scrolltrigger.jpg)](https://gsap.com/docs/v3/Plugins/ScrollTrigger) 69 | 70 | ### Using React? 71 | 72 | There's a @gsap/react package that exposes a `useGSAP()` hook which is a drop-in replacement for `useEffect()`/`useLayoutEffect()`, automating cleanup tasks. Please read the React guide for details. 73 | 74 | ### Resources 75 | 76 | * gsap.com 77 | * Getting started guide 78 | * Docs 79 | * Demos & starter templates 80 | * Community forums 81 | * Ease Visualizer 82 | * Showcase 83 | * YouTube Channel 84 | * Cheat sheet 85 | * Webflow 86 | 87 | ### Need help? 88 | Ask in the friendly GSAP forums. Or share your knowledge and help someone else - it's a great way to sharpen your skills! Report any bugs there too (or file an issue here if you prefer). 89 | 90 | ### License 91 | GreenSock's standard "no charge" license can be viewed at https://gsap.com/standard-license. 92 | 93 | Copyright (c) 2008-2025, GreenSock. All rights reserved. -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | Please report (suspected) security vulnerabilities to 4 | **[info@greensock.com](mailto:info@greensock.com)**. You will receive a response from 5 | us within 72 hours. If the issue is confirmed, we will release a patch as soon 6 | as possible depending on complexity. -------------------------------------------------------------------------------- /dist/CSSRulePlugin.js: -------------------------------------------------------------------------------- 1 | (function (global, factory) { 2 | typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : 3 | typeof define === 'function' && define.amd ? define(['exports'], factory) : 4 | (global = global || self, factory(global.window = global.window || {})); 5 | }(this, (function (exports) { 'use strict'; 6 | 7 | /*! 8 | * CSSRulePlugin 3.13.0 9 | * https://gsap.com 10 | * 11 | * @license Copyright 2008-2025, GreenSock. All rights reserved. 12 | * Subject to the terms at https://gsap.com/standard-license 13 | * @author: Jack Doyle, jack@greensock.com 14 | */ 15 | var gsap, 16 | _coreInitted, 17 | _doc, 18 | CSSPlugin, 19 | _windowExists = function _windowExists() { 20 | return typeof window !== "undefined"; 21 | }, 22 | _getGSAP = function _getGSAP() { 23 | return gsap || _windowExists() && (gsap = window.gsap) && gsap.registerPlugin && gsap; 24 | }, 25 | _checkRegister = function _checkRegister() { 26 | if (!_coreInitted) { 27 | _initCore(); 28 | 29 | if (!CSSPlugin) { 30 | console.warn("Please gsap.registerPlugin(CSSPlugin, CSSRulePlugin)"); 31 | } 32 | } 33 | 34 | return _coreInitted; 35 | }, 36 | _initCore = function _initCore(core) { 37 | gsap = core || _getGSAP(); 38 | 39 | if (_windowExists()) { 40 | _doc = document; 41 | } 42 | 43 | if (gsap) { 44 | CSSPlugin = gsap.plugins.css; 45 | 46 | if (CSSPlugin) { 47 | _coreInitted = 1; 48 | } 49 | } 50 | }; 51 | 52 | var CSSRulePlugin = { 53 | version: "3.13.0", 54 | name: "cssRule", 55 | init: function init(target, value, tween, index, targets) { 56 | if (!_checkRegister() || typeof target.cssText === "undefined") { 57 | return false; 58 | } 59 | 60 | var div = target._gsProxy = target._gsProxy || _doc.createElement("div"); 61 | 62 | this.ss = target; 63 | this.style = div.style; 64 | div.style.cssText = target.cssText; 65 | CSSPlugin.prototype.init.call(this, div, value, tween, index, targets); 66 | }, 67 | render: function render(ratio, data) { 68 | var pt = data._pt, 69 | style = data.style, 70 | ss = data.ss, 71 | i; 72 | 73 | while (pt) { 74 | pt.r(ratio, pt.d); 75 | pt = pt._next; 76 | } 77 | 78 | i = style.length; 79 | 80 | while (--i > -1) { 81 | ss[style[i]] = style[style[i]]; 82 | } 83 | }, 84 | getRule: function getRule(selector) { 85 | _checkRegister(); 86 | 87 | var ruleProp = _doc.all ? "rules" : "cssRules", 88 | styleSheets = _doc.styleSheets, 89 | i = styleSheets.length, 90 | pseudo = selector.charAt(0) === ":", 91 | j, 92 | curSS, 93 | cs, 94 | a; 95 | selector = (pseudo ? "" : ",") + selector.split("::").join(":").toLowerCase() + ","; 96 | 97 | if (pseudo) { 98 | a = []; 99 | } 100 | 101 | while (i--) { 102 | try { 103 | curSS = styleSheets[i][ruleProp]; 104 | 105 | if (!curSS) { 106 | continue; 107 | } 108 | 109 | j = curSS.length; 110 | } catch (e) { 111 | console.warn(e); 112 | continue; 113 | } 114 | 115 | while (--j > -1) { 116 | cs = curSS[j]; 117 | 118 | if (cs.selectorText && ("," + cs.selectorText.split("::").join(":").toLowerCase() + ",").indexOf(selector) !== -1) { 119 | if (pseudo) { 120 | a.push(cs.style); 121 | } else { 122 | return cs.style; 123 | } 124 | } 125 | } 126 | } 127 | 128 | return a; 129 | }, 130 | register: _initCore 131 | }; 132 | _getGSAP() && gsap.registerPlugin(CSSRulePlugin); 133 | 134 | exports.CSSRulePlugin = CSSRulePlugin; 135 | exports.default = CSSRulePlugin; 136 | 137 | Object.defineProperty(exports, '__esModule', { value: true }); 138 | 139 | }))); 140 | -------------------------------------------------------------------------------- /dist/CSSRulePlugin.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * CSSRulePlugin 3.13.0 3 | * https://gsap.com 4 | * 5 | * @license Copyright 2025, GreenSock. All rights reserved. 6 | * Subject to the terms at https://gsap.com/standard-license. 7 | * @author: Jack Doyle, jack@greensock.com 8 | */ 9 | 10 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).window=e.window||{})}(this,function(e){"use strict";function h(){return"undefined"!=typeof window}function i(){return t||h()&&(t=window.gsap)&&t.registerPlugin&&t}function j(){return n||(s(),o||console.warn("Please gsap.registerPlugin(CSSPlugin, CSSRulePlugin)")),n}var t,n,c,o,s=function _initCore(e){t=e||i(),h()&&(c=document),t&&(o=t.plugins.css)&&(n=1)},r={version:"3.13.0",name:"cssRule",init:function init(e,t,n,i,s){if(!j()||void 0===e.cssText)return!1;var r=e._gsProxy=e._gsProxy||c.createElement("div");this.ss=e,this.style=r.style,r.style.cssText=e.cssText,o.prototype.init.call(this,r,t,n,i,s)},render:function render(e,t){for(var n,i=t._pt,s=t.style,r=t.ss;i;)i.r(e,i.d),i=i._next;for(n=s.length;-1<--n;)r[s[n]]=s[s[n]]},getRule:function getRule(e){j();var t,n,i,s,r=c.all?"rules":"cssRules",o=c.styleSheets,l=o.length,u=":"===e.charAt(0);for(e=(u?"":",")+e.split("::").join(":").toLowerCase()+",",u&&(s=[]);l--;){try{if(!(n=o[l][r]))continue;t=n.length}catch(e){console.warn(e);continue}for(;-1<--t;)if((i=n[t]).selectorText&&-1!==(","+i.selectorText.split("::").join(":").toLowerCase()+",").indexOf(e)){if(!u)return i.style;s.push(i.style)}}return s},register:s};i()&&t.registerPlugin(r),e.CSSRulePlugin=r,e.default=r;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}}); 11 | 12 | -------------------------------------------------------------------------------- /dist/CSSRulePlugin.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"CSSRulePlugin.min.js","sources":["../src/CSSRulePlugin.js"],"sourcesContent":["/*!\n * CSSRulePlugin 3.13.0\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Subject to the terms at https://gsap.com/standard-license\n * @author: Jack Doyle, jack@greensock.com\n*/\n/* eslint-disable */\n\nlet gsap, _coreInitted, _win, _doc, CSSPlugin,\n\t_windowExists = () => typeof(window) !== \"undefined\",\n\t_getGSAP = () => gsap || (_windowExists() && (gsap = window.gsap) && gsap.registerPlugin && gsap),\n\t_checkRegister = () => {\n\t\tif (!_coreInitted) {\n\t\t\t_initCore();\n\t\t\tif (!CSSPlugin) {\n\t\t\t\tconsole.warn(\"Please gsap.registerPlugin(CSSPlugin, CSSRulePlugin)\");\n\t\t\t}\n\t\t}\n\t\treturn _coreInitted;\n\t},\n\t_initCore = core => {\n\t\tgsap = core || _getGSAP();\n\t\tif (_windowExists()) {\n\t\t\t_win = window;\n\t\t\t_doc = document;\n\t\t}\n\t\tif (gsap) {\n\t\t\tCSSPlugin = gsap.plugins.css;\n\t\t\tif (CSSPlugin) {\n\t\t\t\t_coreInitted = 1;\n\t\t\t}\n\t\t}\n\t};\n\n\nexport const CSSRulePlugin = {\n\tversion: \"3.13.0\",\n\tname: \"cssRule\",\n\tinit(target, value, tween, index, targets) {\n\t\tif (!_checkRegister() || typeof(target.cssText) === \"undefined\") {\n\t\t\treturn false;\n\t\t}\n\t\tlet div = target._gsProxy = target._gsProxy || _doc.createElement(\"div\");\n\t\tthis.ss = target;\n\t\tthis.style = div.style;\n\t\tdiv.style.cssText = target.cssText;\n\t\tCSSPlugin.prototype.init.call(this, div, value, tween, index, targets); //we just offload all the work to the regular CSSPlugin and then copy the cssText back over to the rule in the render() method. This allows us to have all of the updates to CSSPlugin automatically flow through to CSSRulePlugin instead of having to maintain both\n\t},\n\trender(ratio, data) {\n\t\tlet pt = data._pt,\n\t\t\tstyle = data.style,\n\t\t\tss = data.ss,\n\t\t\ti;\n\t\twhile (pt) {\n\t\t\tpt.r(ratio, pt.d);\n\t\t\tpt = pt._next;\n\t\t}\n\t\ti = style.length;\n\t\twhile (--i > -1) {\n\t\t\tss[style[i]] = style[style[i]];\n\t\t}\n\t},\n\tgetRule(selector) {\n\t\t_checkRegister();\n\t\tlet ruleProp = _doc.all ? \"rules\" : \"cssRules\",\n\t\t\tstyleSheets = _doc.styleSheets,\n\t\t\ti = styleSheets.length,\n\t\t\tpseudo = (selector.charAt(0) === \":\"),\n\t\t\tj, curSS, cs, a;\n\t\tselector = (pseudo ? \"\" : \",\") + selector.split(\"::\").join(\":\").toLowerCase() + \",\"; //note: old versions of IE report tag name selectors as upper case, so we just change everything to lowercase.\n\t\tif (pseudo) {\n\t\t\ta = [];\n\t\t}\n\t\twhile (i--) {\n\t\t\t//Firefox may throw insecure operation errors when css is loaded from other domains, so try/catch.\n\t\t\ttry {\n\t\t\t\tcurSS = styleSheets[i][ruleProp];\n\t\t\t\tif (!curSS) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tj = curSS.length;\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(e);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\twhile (--j > -1) {\n\t\t\t\tcs = curSS[j];\n\t\t\t\tif (cs.selectorText && (\",\" + cs.selectorText.split(\"::\").join(\":\").toLowerCase() + \",\").indexOf(selector) !== -1) { //note: IE adds an extra \":\" to pseudo selectors, so .myClass:after becomes .myClass::after, so we need to strip the extra one out.\n\t\t\t\t\tif (pseudo) {\n\t\t\t\t\t\ta.push(cs.style);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn cs.style;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t},\n\tregister: _initCore\n};\n\n_getGSAP() && gsap.registerPlugin(CSSRulePlugin);\n\nexport { CSSRulePlugin as default };"],"names":["_windowExists","window","_getGSAP","gsap","registerPlugin","_checkRegister","_coreInitted","_initCore","CSSPlugin","console","warn","_doc","core","document","plugins","css","CSSRulePlugin","version","name","init","target","value","tween","index","targets","cssText","div","_gsProxy","createElement","ss","style","prototype","call","this","render","ratio","data","i","pt","_pt","r","d","_next","length","getRule","selector","j","curSS","cs","a","ruleProp","all","styleSheets","pseudo","charAt","split","join","toLowerCase","e","selectorText","indexOf","push","register"],"mappings":";;;;;;;;;6MAWiB,SAAhBA,UAAyC,oBAAZC,OAClB,SAAXC,WAAiBC,GAASH,MAAoBG,EAAOF,OAAOE,OAASA,EAAKC,gBAAkBD,EAC3E,SAAjBE,WACMC,IACJC,IACKC,GACJC,QAAQC,KAAK,yDAGRJ,MAVLH,EAAMG,EAAoBK,EAAMH,EAYnCD,EAAY,SAAZA,UAAYK,GACXT,EAAOS,GAAQV,IACXF,MAEHW,EAAOE,UAEJV,IACHK,EAAYL,EAAKW,QAAQC,OAExBT,EAAe,IAMNU,EAAgB,CAC5BC,QAAS,SACTC,KAAM,UACNC,mBAAKC,EAAQC,EAAOC,EAAOC,EAAOC,OAC5BnB,UAA+C,IAApBe,EAAOK,eAC/B,MAEJC,EAAMN,EAAOO,SAAWP,EAAOO,UAAYhB,EAAKiB,cAAc,YAC7DC,GAAKT,OACLU,MAAQJ,EAAII,MACjBJ,EAAII,MAAML,QAAUL,EAAOK,QAC3BjB,EAAUuB,UAAUZ,KAAKa,KAAKC,KAAMP,EAAKL,EAAOC,EAAOC,EAAOC,IAE/DU,uBAAOC,EAAOC,WAIZC,EAHGC,EAAKF,EAAKG,IACbT,EAAQM,EAAKN,MACbD,EAAKO,EAAKP,GAEJS,GACNA,EAAGE,EAAEL,EAAOG,EAAGG,GACfH,EAAKA,EAAGI,UAETL,EAAIP,EAAMa,QACI,IAALN,GACRR,EAAGC,EAAMO,IAAMP,EAAMA,EAAMO,KAG7BO,yBAAQC,GACPxC,QAKCyC,EAAGC,EAAOC,EAAIC,EAJXC,EAAWvC,EAAKwC,IAAM,QAAU,WACnCC,EAAczC,EAAKyC,YACnBf,EAAIe,EAAYT,OAChBU,EAAiC,MAAvBR,EAASS,OAAO,OAE3BT,GAAYQ,EAAS,GAAK,KAAOR,EAASU,MAAM,MAAMC,KAAK,KAAKC,cAAgB,IAC5EJ,IACHJ,EAAI,IAEEZ,KAAK,UAGVU,EAAQK,EAAYf,GAAGa,aAIvBJ,EAAIC,EAAMJ,OACT,MAAOe,GACRjD,QAAQC,KAAKgD,kBAGA,IAALZ,OACRE,EAAKD,EAAMD,IACJa,eAAyG,KAAxF,IAAMX,EAAGW,aAAaJ,MAAM,MAAMC,KAAK,KAAKC,cAAgB,KAAKG,QAAQf,GAAkB,KAC9GQ,SAGIL,EAAGlB,MAFVmB,EAAEY,KAAKb,EAAGlB,eAOPmB,GAERa,SAAUvD,GAGXL,KAAcC,EAAKC,eAAeY"} -------------------------------------------------------------------------------- /dist/CustomBounce.js: -------------------------------------------------------------------------------- 1 | (function (global, factory) { 2 | typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : 3 | typeof define === 'function' && define.amd ? define(['exports'], factory) : 4 | (global = global || self, factory(global.window = global.window || {})); 5 | }(this, (function (exports) { 'use strict'; 6 | 7 | /*! 8 | * CustomBounce 3.13.0 9 | * https://gsap.com 10 | * 11 | * @license Copyright 2008-2025, GreenSock. All rights reserved. 12 | * Subject to the terms at https://gsap.com/standard-license 13 | * @author: Jack Doyle, jack@greensock.com 14 | */ 15 | var gsap, 16 | _coreInitted, 17 | createCustomEase, 18 | _getGSAP = function _getGSAP() { 19 | return gsap || typeof window !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap; 20 | }, 21 | _initCore = function _initCore(required) { 22 | gsap = _getGSAP(); 23 | createCustomEase = gsap && gsap.parseEase("_CE"); 24 | 25 | if (createCustomEase) { 26 | _coreInitted = 1; 27 | 28 | gsap.parseEase("bounce").config = function (vars) { 29 | return typeof vars === "object" ? _create("", vars) : _create("bounce(" + vars + ")", { 30 | strength: +vars 31 | }); 32 | }; 33 | } else { 34 | required && console.warn("Please gsap.registerPlugin(CustomEase, CustomBounce)"); 35 | } 36 | }, 37 | _normalizeX = function _normalizeX(a) { 38 | var l = a.length, 39 | s = 1 / a[l - 2], 40 | rnd = 1000, 41 | i; 42 | 43 | for (i = 2; i < l; i += 2) { 44 | a[i] = ~~(a[i] * s * rnd) / rnd; 45 | } 46 | 47 | a[l - 2] = 1; 48 | }, 49 | _create = function _create(id, vars) { 50 | if (!_coreInitted) { 51 | _initCore(1); 52 | } 53 | 54 | vars = vars || {}; 55 | 56 | { 57 | var max = 0.999, 58 | decay = Math.min(max, vars.strength || 0.7), 59 | decayX = decay, 60 | gap = (vars.squash || 0) / 100, 61 | originalGap = gap, 62 | slope = 1 / 0.03, 63 | w = 0.2, 64 | h = 1, 65 | prevX = 0.1, 66 | path = [0, 0, 0.07, 0, 0.1, 1, 0.1, 1], 67 | squashPath = [0, 0, 0, 0, 0.1, 0, 0.1, 0], 68 | cp1, 69 | cp2, 70 | x, 71 | y, 72 | i, 73 | nextX, 74 | squishMagnitude; 75 | 76 | for (i = 0; i < 200; i++) { 77 | w *= decayX * ((decayX + 1) / 2); 78 | h *= decay * decay; 79 | nextX = prevX + w; 80 | x = prevX + w * 0.49; 81 | y = 1 - h; 82 | cp1 = prevX + h / slope; 83 | cp2 = x + (x - cp1) * 0.8; 84 | 85 | if (gap) { 86 | prevX += gap; 87 | cp1 += gap; 88 | x += gap; 89 | cp2 += gap; 90 | nextX += gap; 91 | squishMagnitude = gap / originalGap; 92 | squashPath.push(prevX - gap, 0, prevX - gap, squishMagnitude, prevX - gap / 2, squishMagnitude, prevX, squishMagnitude, prevX, 0, prevX, 0, prevX, squishMagnitude * -0.6, prevX + (nextX - prevX) / 6, 0, nextX, 0); 93 | path.push(prevX - gap, 1, prevX, 1, prevX, 1); 94 | gap *= decay * decay; 95 | } 96 | 97 | path.push(prevX, 1, cp1, y, x, y, cp2, y, nextX, 1, nextX, 1); 98 | decay *= 0.95; 99 | slope = h / (nextX - cp2); 100 | prevX = nextX; 101 | 102 | if (y > max) { 103 | break; 104 | } 105 | } 106 | 107 | if (vars.endAtStart && vars.endAtStart !== "false") { 108 | x = -0.1; 109 | path.unshift(x, 1, x, 1, -0.07, 0); 110 | 111 | if (originalGap) { 112 | gap = originalGap * 2.5; 113 | x -= gap; 114 | path.unshift(x, 1, x, 1, x, 1); 115 | squashPath.splice(0, 6); 116 | squashPath.unshift(x, 0, x, 0, x, 1, x + gap / 2, 1, x + gap, 1, x + gap, 0, x + gap, 0, x + gap, -0.6, x + gap + 0.033, 0); 117 | 118 | for (i = 0; i < squashPath.length; i += 2) { 119 | squashPath[i] -= x; 120 | } 121 | } 122 | 123 | for (i = 0; i < path.length; i += 2) { 124 | path[i] -= x; 125 | path[i + 1] = 1 - path[i + 1]; 126 | } 127 | } 128 | 129 | if (gap) { 130 | _normalizeX(squashPath); 131 | 132 | squashPath[2] = "C" + squashPath[2]; 133 | createCustomEase(vars.squashID || id + "-squash", "M" + squashPath.join(",")); 134 | } 135 | 136 | _normalizeX(path); 137 | 138 | path[2] = "C" + path[2]; 139 | return createCustomEase(id, "M" + path.join(",")); 140 | } 141 | }; 142 | 143 | var CustomBounce = function () { 144 | function CustomBounce(id, vars) { 145 | this.ease = _create(id, vars); 146 | } 147 | 148 | CustomBounce.create = function create(id, vars) { 149 | return _create(id, vars); 150 | }; 151 | 152 | CustomBounce.register = function register(core) { 153 | gsap = core; 154 | 155 | _initCore(); 156 | }; 157 | 158 | return CustomBounce; 159 | }(); 160 | _getGSAP() && gsap.registerPlugin(CustomBounce); 161 | CustomBounce.version = "3.13.0"; 162 | 163 | exports.CustomBounce = CustomBounce; 164 | exports.default = CustomBounce; 165 | 166 | Object.defineProperty(exports, '__esModule', { value: true }); 167 | 168 | }))); 169 | -------------------------------------------------------------------------------- /dist/CustomBounce.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * CustomBounce 3.13.0 3 | * https://gsap.com 4 | * 5 | * @license Copyright 2025, GreenSock. All rights reserved. 6 | * Subject to the terms at https://gsap.com/standard-license. 7 | * @author: Jack Doyle, jack@greensock.com 8 | */ 9 | 10 | !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).window=e.window||{})}(this,function(e){"use strict";function g(){return n||"undefined"!=typeof window&&(n=window.gsap)&&n.registerPlugin&&n}function h(e){n=g(),(j=n&&n.parseEase("_CE"))?(b=1,n.parseEase("bounce").config=function(e){return"object"==typeof e?t("",e):t("bounce("+e+")",{strength:+e})}):e&&console.warn("Please gsap.registerPlugin(CustomEase, CustomBounce)")}function i(e){var n,t=e.length,o=1/e[t-2];for(n=2;n 0 ? -1 : 1) * yEase(i * inc); 124 | easedX = xEase(x); 125 | path.push(xEase(x - inc / 2), y, easedX, y); 126 | } 127 | 128 | path.push(xEase(x + inc / 4), y, xEase(x + inc / 4), 0, 1, 0); 129 | } 130 | 131 | i = path.length; 132 | 133 | while (--i > -1) { 134 | path[i] = ~~(path[i] * rnd) / rnd; 135 | } 136 | 137 | path[2] = "C" + path[2]; 138 | return createCustomEase(id, "M" + path.join(",")); 139 | } 140 | }; 141 | 142 | var CustomWiggle = function () { 143 | function CustomWiggle(id, vars) { 144 | this.ease = _create(id, vars); 145 | } 146 | 147 | CustomWiggle.create = function create(id, vars) { 148 | return _create(id, vars); 149 | }; 150 | 151 | CustomWiggle.register = function register(core) { 152 | gsap = core; 153 | 154 | _initCore(); 155 | }; 156 | 157 | return CustomWiggle; 158 | }(); 159 | _getGSAP() && gsap.registerPlugin(CustomWiggle); 160 | CustomWiggle.version = "3.13.0"; 161 | 162 | exports.CustomWiggle = CustomWiggle; 163 | exports.default = CustomWiggle; 164 | 165 | Object.defineProperty(exports, '__esModule', { value: true }); 166 | 167 | }))); 168 | -------------------------------------------------------------------------------- /dist/CustomWiggle.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * CustomWiggle 3.13.0 3 | * https://gsap.com 4 | * 5 | * @license Copyright 2025, GreenSock. All rights reserved. 6 | * Subject to the terms at https://gsap.com/standard-license. 7 | * @author: Jack Doyle, jack@greensock.com 8 | */ 9 | 10 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).window=e.window||{})}(this,function(e){"use strict";function g(){return n||"undefined"!=typeof window&&(n=window.gsap)&&n.registerPlugin&&n}function i(e){return e}function j(e){if(!C)if(n=g(),M=n&&n.parseEase("_CE")){for(var t in y)y[t]=M("",y[t]);C=1,o("wiggle").config=function(e){return"object"==typeof e?o("",e):o("wiggle("+e+")",{wiggles:+e})}}else e&&console.warn("Please gsap.registerPlugin(CustomEase, CustomWiggle)")}function k(t,e){return"function"!=typeof t&&(t=n.parseEase(t)||M("",t)),t.custom||!e?t:function(e){return 1-t(e)}}var n,C,M,y={easeOut:"M0,1,C0.7,1,0.6,0,1,0",easeInOut:"M0,0,C0.1,0,0.24,1,0.444,1,0.644,1,0.6,0,1,0",anticipate:"M0,0,C0,0.222,0.024,0.386,0,0.4,0.18,0.455,0.65,0.646,0.7,0.67,0.9,0.76,1,0.846,1,1",uniform:"M0,0,C0,0.95,0,1,0,1,0,1,1,1,1,1,1,1,1,0,1,0"},o=function _create(e,t){C||j(1);var n,o,s,u,r,a,g,f,l,c=0|((t=t||{}).wiggles||10),p=1/c,d=p/2,m="anticipate"===t.type,h=y[t.type]||y.easeOut,w=i;if(m&&(w=h,h=y.easeOut),t.timingEase&&(w=k(t.timingEase)),t.amplitudeEase&&(h=k(t.amplitudeEase,!0)),f=[0,0,(a=w(d))/4,0,a/2,g=m?-h(d):h(d),a,g],"random"===t.type){for(f.length=4,n=w(p),o=2*Math.random()-1,l=2;l length cannot be measured when vector-effect is non-scaling-stroke and the element isn't proportionally scaled."),t*=(d+c)/2,l.strokeDasharray=i;else if("rect"===h)t=2*x*d+2*m*c;else if("line"===h)t=u(_,y,_+x,y+m,d,c);else if("polyline"===h||"polygon"===h)for(n=e.getAttribute("points").match(P)||[],"polygon"===h&&n.push(n[0],n[1]),t=0,o=2;ot._length-.05&&(i+=i<0?.005:-.005)&&(r+=.005),a.strokeDashoffset=s?i:i+.001,a.strokeDasharray=r<.1?"none":s?s+"px,"+(t._nowrap?999999:r)+"px":"0px, 999999px"}}else t.styles.revert()},getLength:z,getPosition:A};m()&&t.registerPlugin(n),e.DrawSVGPlugin=n,e.default=n;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}}); 11 | 12 | -------------------------------------------------------------------------------- /dist/EasePack.js: -------------------------------------------------------------------------------- 1 | (function (global, factory) { 2 | typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : 3 | typeof define === 'function' && define.amd ? define(['exports'], factory) : 4 | (global = global || self, factory(global.window = global.window || {})); 5 | }(this, (function (exports) { 'use strict'; 6 | 7 | /*! 8 | * EasePack 3.13.0 9 | * https://gsap.com 10 | * 11 | * @license Copyright 2008-2025, GreenSock. All rights reserved. 12 | * Subject to the terms at https://gsap.com/standard-license 13 | * @author: Jack Doyle, jack@greensock.com 14 | */ 15 | var gsap, 16 | _registerEase, 17 | _getGSAP = function _getGSAP() { 18 | return gsap || typeof window !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap; 19 | }, 20 | _boolean = function _boolean(value, defaultValue) { 21 | return !!(typeof value === "undefined" ? defaultValue : value && !~(value + "").indexOf("false")); 22 | }, 23 | _initCore = function _initCore(core) { 24 | gsap = core || _getGSAP(); 25 | 26 | if (gsap) { 27 | _registerEase = gsap.registerEase; 28 | 29 | var eases = gsap.parseEase(), 30 | createConfig = function createConfig(ease) { 31 | return function (ratio) { 32 | var y = 0.5 + ratio / 2; 33 | 34 | ease.config = function (p) { 35 | return ease(2 * (1 - p) * p * y + p * p); 36 | }; 37 | }; 38 | }, 39 | p; 40 | 41 | for (p in eases) { 42 | if (!eases[p].config) { 43 | createConfig(eases[p]); 44 | } 45 | } 46 | 47 | _registerEase("slow", SlowMo); 48 | 49 | _registerEase("expoScale", ExpoScaleEase); 50 | 51 | _registerEase("rough", RoughEase); 52 | 53 | for (p in EasePack) { 54 | p !== "version" && gsap.core.globals(p, EasePack[p]); 55 | } 56 | } 57 | }, 58 | _createSlowMo = function _createSlowMo(linearRatio, power, yoyoMode) { 59 | linearRatio = Math.min(1, linearRatio || 0.7); 60 | 61 | var pow = linearRatio < 1 ? power || power === 0 ? power : 0.7 : 0, 62 | p1 = (1 - linearRatio) / 2, 63 | p3 = p1 + linearRatio, 64 | calcEnd = _boolean(yoyoMode); 65 | 66 | return function (p) { 67 | var r = p + (0.5 - p) * pow; 68 | return p < p1 ? calcEnd ? 1 - (p = 1 - p / p1) * p : r - (p = 1 - p / p1) * p * p * p * r : p > p3 ? calcEnd ? p === 1 ? 0 : 1 - (p = (p - p3) / p1) * p : r + (p - r) * (p = (p - p3) / p1) * p * p * p : calcEnd ? 1 : r; 69 | }; 70 | }, 71 | _createExpoScale = function _createExpoScale(start, end, ease) { 72 | var p1 = Math.log(end / start), 73 | p2 = end - start; 74 | ease && (ease = gsap.parseEase(ease)); 75 | return function (p) { 76 | return (start * Math.exp(p1 * (ease ? ease(p) : p)) - start) / p2; 77 | }; 78 | }, 79 | EasePoint = function EasePoint(time, value, next) { 80 | this.t = time; 81 | this.v = value; 82 | 83 | if (next) { 84 | this.next = next; 85 | next.prev = this; 86 | this.c = next.v - value; 87 | this.gap = next.t - time; 88 | } 89 | }, 90 | _createRoughEase = function _createRoughEase(vars) { 91 | if (typeof vars !== "object") { 92 | vars = { 93 | points: +vars || 20 94 | }; 95 | } 96 | 97 | var taper = vars.taper || "none", 98 | a = [], 99 | cnt = 0, 100 | points = (+vars.points || 20) | 0, 101 | i = points, 102 | randomize = _boolean(vars.randomize, true), 103 | clamp = _boolean(vars.clamp), 104 | template = gsap ? gsap.parseEase(vars.template) : 0, 105 | strength = (+vars.strength || 1) * 0.4, 106 | x, 107 | y, 108 | bump, 109 | invX, 110 | obj, 111 | pnt, 112 | recent; 113 | 114 | while (--i > -1) { 115 | x = randomize ? Math.random() : 1 / points * i; 116 | y = template ? template(x) : x; 117 | 118 | if (taper === "none") { 119 | bump = strength; 120 | } else if (taper === "out") { 121 | invX = 1 - x; 122 | bump = invX * invX * strength; 123 | } else if (taper === "in") { 124 | bump = x * x * strength; 125 | } else if (x < 0.5) { 126 | invX = x * 2; 127 | bump = invX * invX * 0.5 * strength; 128 | } else { 129 | invX = (1 - x) * 2; 130 | bump = invX * invX * 0.5 * strength; 131 | } 132 | 133 | if (randomize) { 134 | y += Math.random() * bump - bump * 0.5; 135 | } else if (i % 2) { 136 | y += bump * 0.5; 137 | } else { 138 | y -= bump * 0.5; 139 | } 140 | 141 | if (clamp) { 142 | if (y > 1) { 143 | y = 1; 144 | } else if (y < 0) { 145 | y = 0; 146 | } 147 | } 148 | 149 | a[cnt++] = { 150 | x: x, 151 | y: y 152 | }; 153 | } 154 | 155 | a.sort(function (a, b) { 156 | return a.x - b.x; 157 | }); 158 | pnt = new EasePoint(1, 1, null); 159 | i = points; 160 | 161 | while (i--) { 162 | obj = a[i]; 163 | pnt = new EasePoint(obj.x, obj.y, pnt); 164 | } 165 | 166 | recent = new EasePoint(0, 0, pnt.t ? pnt : pnt.next); 167 | return function (p) { 168 | var pnt = recent; 169 | 170 | if (p > pnt.t) { 171 | while (pnt.next && p >= pnt.t) { 172 | pnt = pnt.next; 173 | } 174 | 175 | pnt = pnt.prev; 176 | } else { 177 | while (pnt.prev && p <= pnt.t) { 178 | pnt = pnt.prev; 179 | } 180 | } 181 | 182 | recent = pnt; 183 | return pnt.v + (p - pnt.t) / pnt.gap * pnt.c; 184 | }; 185 | }; 186 | 187 | var SlowMo = _createSlowMo(0.7); 188 | SlowMo.ease = SlowMo; 189 | SlowMo.config = _createSlowMo; 190 | var ExpoScaleEase = _createExpoScale(1, 2); 191 | ExpoScaleEase.config = _createExpoScale; 192 | var RoughEase = _createRoughEase(); 193 | RoughEase.ease = RoughEase; 194 | RoughEase.config = _createRoughEase; 195 | var EasePack = { 196 | SlowMo: SlowMo, 197 | RoughEase: RoughEase, 198 | ExpoScaleEase: ExpoScaleEase 199 | }; 200 | 201 | for (var p in EasePack) { 202 | EasePack[p].register = _initCore; 203 | EasePack[p].version = "3.13.0"; 204 | } 205 | 206 | _getGSAP() && gsap.registerPlugin(SlowMo); 207 | 208 | exports.EasePack = EasePack; 209 | exports.ExpoScaleEase = ExpoScaleEase; 210 | exports.RoughEase = RoughEase; 211 | exports.SlowMo = SlowMo; 212 | exports.default = EasePack; 213 | 214 | Object.defineProperty(exports, '__esModule', { value: true }); 215 | 216 | }))); 217 | -------------------------------------------------------------------------------- /dist/EasePack.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * EasePack 3.13.0 3 | * https://gsap.com 4 | * 5 | * @license Copyright 2025, GreenSock. All rights reserved. 6 | * Subject to the terms at https://gsap.com/standard-license. 7 | * @author: Jack Doyle, jack@greensock.com 8 | */ 9 | 10 | !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).window=e.window||{})}(this,function(e){"use strict";function f(){return w||"undefined"!=typeof window&&(w=window.gsap)&&w.registerPlugin&&w}function g(e,n){return!!(void 0===e?n:e&&!~(e+"").indexOf("false"))}function h(e){if(w=e||f()){r=w.registerEase;var n,t=w.parseEase(),o=function createConfig(t){return function(e){var n=.5+e/2;t.config=function(e){return t(2*(1-e)*e*n+e*e)}}};for(n in t)t[n].config||o(t[n]);for(n in r("slow",a),r("expoScale",s),r("rough",u),c)"version"!==n&&w.core.globals(n,c[n])}}function i(e,n,t){var o=(e=Math.min(1,e||.7))<1?n||0===n?n:.7:0,r=(1-e)/2,i=r+e,a=g(t);return function(e){var n=e+(.5-e)*o;return en.t){for(;n.next&&e>=n.t;)n=n.next;n=n.prev}else for(;n.prev&&e<=n.t;)n=n.prev;return(f=n).v+(e-n.t)/n.gap*n.c}}var w,r,a=i(.7);(a.ease=a).config=i;var s=j(1,2);s.config=j;var u=l();(u.ease=u).config=l;var c={SlowMo:a,RoughEase:u,ExpoScaleEase:s};for(var n in c)c[n].register=h,c[n].version="3.13.0";f()&&w.registerPlugin(a),e.EasePack=c,e.ExpoScaleEase=s,e.RoughEase=u,e.SlowMo=a,e.default=c;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}}); 11 | 12 | -------------------------------------------------------------------------------- /dist/EaselPlugin.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * EaselPlugin 3.13.0 3 | * https://gsap.com 4 | * 5 | * @license Copyright 2025, GreenSock. All rights reserved. 6 | * Subject to the terms at https://gsap.com/standard-license. 7 | * @author: Jack Doyle, jack@greensock.com 8 | */ 9 | 10 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).window=e.window||{})}(this,function(e){"use strict";function k(){return"undefined"!=typeof window}function l(){return h||k()&&(h=window.gsap)&&h.registerPlugin&&h}function m(){return r||t&&t.createjs||t||{}}function n(e){return console.warn(e)}function o(e){var t=e.getBounds&&e.getBounds();t||(t=e.nominalBounds||{x:0,y:0,width:100,height:100},e.setBounds&&e.setBounds(t.x,t.y,t.width,t.height)),e.cache&&e.cache(t.x,t.y,t.width,t.height),n("EaselPlugin: for filters to display in EaselJS, you must call the object's cache() method first. GSAP attempted to use the target's getBounds() for the cache but that may not be completely accurate. "+e)}function p(e,t,r){(b=b||m().ColorFilter)||n("EaselPlugin error: The EaselJS ColorFilter JavaScript file wasn't loaded.");for(var i,l,s,u,a,f,c=e.filters||[],d=c.length;d--;)if(c[d]instanceof b){l=c[d];break}if(l||(l=new b,c.push(l),e.filters=c),s=l.clone(),null!=t.tint)i=h.utils.splitColor(t.tint),u=null!=t.tintAmount?+t.tintAmount:1,s.redOffset=i[0]*u,s.greenOffset=i[1]*u,s.blueOffset=i[2]*u,s.redMultiplier=s.greenMultiplier=s.blueMultiplier=1-u;else for(a in t)"exposure"!==a&&"brightness"!==a&&(s[a]=+t[a]);for(null!=t.exposure?(s.redOffset=s.greenOffset=s.blueOffset=255*(t.exposure-1),s.redMultiplier=s.greenMultiplier=s.blueMultiplier=1):null!=t.brightness&&(u=t.brightness-1,s.redOffset=s.greenOffset=s.blueOffset=0 -1) { 79 | ss[style[i]] = style[style[i]]; 80 | } 81 | }, 82 | getRule: function getRule(selector) { 83 | _checkRegister(); 84 | 85 | var ruleProp = _doc.all ? "rules" : "cssRules", 86 | styleSheets = _doc.styleSheets, 87 | i = styleSheets.length, 88 | pseudo = selector.charAt(0) === ":", 89 | j, 90 | curSS, 91 | cs, 92 | a; 93 | selector = (pseudo ? "" : ",") + selector.split("::").join(":").toLowerCase() + ","; //note: old versions of IE report tag name selectors as upper case, so we just change everything to lowercase. 94 | 95 | if (pseudo) { 96 | a = []; 97 | } 98 | 99 | while (i--) { 100 | //Firefox may throw insecure operation errors when css is loaded from other domains, so try/catch. 101 | try { 102 | curSS = styleSheets[i][ruleProp]; 103 | 104 | if (!curSS) { 105 | continue; 106 | } 107 | 108 | j = curSS.length; 109 | } catch (e) { 110 | console.warn(e); 111 | continue; 112 | } 113 | 114 | while (--j > -1) { 115 | cs = curSS[j]; 116 | 117 | if (cs.selectorText && ("," + cs.selectorText.split("::").join(":").toLowerCase() + ",").indexOf(selector) !== -1) { 118 | //note: IE adds an extra ":" to pseudo selectors, so .myClass:after becomes .myClass::after, so we need to strip the extra one out. 119 | if (pseudo) { 120 | a.push(cs.style); 121 | } else { 122 | return cs.style; 123 | } 124 | } 125 | } 126 | } 127 | 128 | return a; 129 | }, 130 | register: _initCore 131 | }; 132 | _getGSAP() && gsap.registerPlugin(CSSRulePlugin); 133 | export { CSSRulePlugin as default }; -------------------------------------------------------------------------------- /esm/CustomBounce.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * CustomBounce 3.13.0 3 | * https://gsap.com 4 | * 5 | * @license Copyright 2008-2025, GreenSock. All rights reserved. 6 | * Subject to the terms at https://gsap.com/standard-license 7 | * @author: Jack Doyle, jack@greensock.com 8 | */ 9 | 10 | /* eslint-disable */ 11 | var gsap, 12 | _coreInitted, 13 | createCustomEase, 14 | _getGSAP = function _getGSAP() { 15 | return gsap || typeof window !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap; 16 | }, 17 | _initCore = function _initCore(required) { 18 | gsap = _getGSAP(); 19 | createCustomEase = gsap && gsap.parseEase("_CE"); 20 | 21 | if (createCustomEase) { 22 | _coreInitted = 1; 23 | 24 | gsap.parseEase("bounce").config = function (vars) { 25 | return typeof vars === "object" ? _create("", vars) : _create("bounce(" + vars + ")", { 26 | strength: +vars 27 | }); 28 | }; 29 | } else { 30 | required && console.warn("Please gsap.registerPlugin(CustomEase, CustomBounce)"); 31 | } 32 | }, 33 | _normalizeX = function _normalizeX(a) { 34 | //scales all the x values in an array [x, y, x, y...] AND rounds them to the closest hundredth (decimal) 35 | var l = a.length, 36 | s = 1 / a[l - 2], 37 | rnd = 1000, 38 | i; 39 | 40 | for (i = 2; i < l; i += 2) { 41 | a[i] = ~~(a[i] * s * rnd) / rnd; 42 | } 43 | 44 | a[l - 2] = 1; //in case there are any rounding errors. x should always end at 1. 45 | }, 46 | _bonusValidated = 1, 47 | //CustomBounce 48 | _create = function _create(id, vars) { 49 | if (!_coreInitted) { 50 | _initCore(1); 51 | } 52 | 53 | vars = vars || {}; 54 | 55 | if (_bonusValidated) { 56 | var max = 0.999, 57 | decay = Math.min(max, vars.strength || 0.7), 58 | // Math.min(0.999, 1 - 0.3 / (vars.strength || 1)), 59 | decayX = decay, 60 | gap = (vars.squash || 0) / 100, 61 | originalGap = gap, 62 | slope = 1 / 0.03, 63 | w = 0.2, 64 | h = 1, 65 | prevX = 0.1, 66 | path = [0, 0, 0.07, 0, 0.1, 1, 0.1, 1], 67 | squashPath = [0, 0, 0, 0, 0.1, 0, 0.1, 0], 68 | cp1, 69 | cp2, 70 | x, 71 | y, 72 | i, 73 | nextX, 74 | squishMagnitude; 75 | 76 | for (i = 0; i < 200; i++) { 77 | w *= decayX * ((decayX + 1) / 2); 78 | h *= decay * decay; 79 | nextX = prevX + w; 80 | x = prevX + w * 0.49; 81 | y = 1 - h; 82 | cp1 = prevX + h / slope; 83 | cp2 = x + (x - cp1) * 0.8; 84 | 85 | if (gap) { 86 | prevX += gap; 87 | cp1 += gap; 88 | x += gap; 89 | cp2 += gap; 90 | nextX += gap; 91 | squishMagnitude = gap / originalGap; 92 | squashPath.push(prevX - gap, 0, prevX - gap, squishMagnitude, prevX - gap / 2, squishMagnitude, //center peak anchor 93 | prevX, squishMagnitude, prevX, 0, prevX, 0, //base anchor 94 | prevX, squishMagnitude * -0.6, prevX + (nextX - prevX) / 6, 0, nextX, 0); 95 | path.push(prevX - gap, 1, prevX, 1, prevX, 1); 96 | gap *= decay * decay; 97 | } 98 | 99 | path.push(prevX, 1, cp1, y, x, y, cp2, y, nextX, 1, nextX, 1); 100 | decay *= 0.95; 101 | slope = h / (nextX - cp2); 102 | prevX = nextX; 103 | 104 | if (y > max) { 105 | break; 106 | } 107 | } 108 | 109 | if (vars.endAtStart && vars.endAtStart !== "false") { 110 | x = -0.1; 111 | path.unshift(x, 1, x, 1, -0.07, 0); 112 | 113 | if (originalGap) { 114 | gap = originalGap * 2.5; //make the initial anticipation squash longer (more realistic) 115 | 116 | x -= gap; 117 | path.unshift(x, 1, x, 1, x, 1); 118 | squashPath.splice(0, 6); 119 | squashPath.unshift(x, 0, x, 0, x, 1, x + gap / 2, 1, x + gap, 1, x + gap, 0, x + gap, 0, x + gap, -0.6, x + gap + 0.033, 0); 120 | 121 | for (i = 0; i < squashPath.length; i += 2) { 122 | squashPath[i] -= x; 123 | } 124 | } 125 | 126 | for (i = 0; i < path.length; i += 2) { 127 | path[i] -= x; 128 | path[i + 1] = 1 - path[i + 1]; 129 | } 130 | } 131 | 132 | if (gap) { 133 | _normalizeX(squashPath); 134 | 135 | squashPath[2] = "C" + squashPath[2]; 136 | createCustomEase(vars.squashID || id + "-squash", "M" + squashPath.join(",")); 137 | } 138 | 139 | _normalizeX(path); 140 | 141 | path[2] = "C" + path[2]; 142 | return createCustomEase(id, "M" + path.join(",")); 143 | } 144 | }; 145 | 146 | export var CustomBounce = /*#__PURE__*/function () { 147 | function CustomBounce(id, vars) { 148 | this.ease = _create(id, vars); 149 | } 150 | 151 | CustomBounce.create = function create(id, vars) { 152 | return _create(id, vars); 153 | }; 154 | 155 | CustomBounce.register = function register(core) { 156 | gsap = core; 157 | 158 | _initCore(); 159 | }; 160 | 161 | return CustomBounce; 162 | }(); 163 | _getGSAP() && gsap.registerPlugin(CustomBounce); 164 | CustomBounce.version = "3.13.0"; 165 | export { CustomBounce as default }; -------------------------------------------------------------------------------- /esm/CustomWiggle.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * CustomWiggle 3.13.0 3 | * https://gsap.com 4 | * 5 | * @license Copyright 2008-2025, GreenSock. All rights reserved. 6 | * Subject to the terms at https://gsap.com/standard-license 7 | * @author: Jack Doyle, jack@greensock.com 8 | */ 9 | 10 | /* eslint-disable */ 11 | var gsap, 12 | _coreInitted, 13 | createCustomEase, 14 | _getGSAP = function _getGSAP() { 15 | return gsap || typeof window !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap; 16 | }, 17 | _eases = { 18 | easeOut: "M0,1,C0.7,1,0.6,0,1,0", 19 | easeInOut: "M0,0,C0.1,0,0.24,1,0.444,1,0.644,1,0.6,0,1,0", 20 | anticipate: "M0,0,C0,0.222,0.024,0.386,0,0.4,0.18,0.455,0.65,0.646,0.7,0.67,0.9,0.76,1,0.846,1,1", 21 | uniform: "M0,0,C0,0.95,0,1,0,1,0,1,1,1,1,1,1,1,1,0,1,0" 22 | }, 23 | _linearEase = function _linearEase(p) { 24 | return p; 25 | }, 26 | _initCore = function _initCore(required) { 27 | if (!_coreInitted) { 28 | gsap = _getGSAP(); 29 | createCustomEase = gsap && gsap.parseEase("_CE"); 30 | 31 | if (createCustomEase) { 32 | for (var p in _eases) { 33 | _eases[p] = createCustomEase("", _eases[p]); 34 | } 35 | 36 | _coreInitted = 1; 37 | 38 | _create("wiggle").config = function (vars) { 39 | return typeof vars === "object" ? _create("", vars) : _create("wiggle(" + vars + ")", { 40 | wiggles: +vars 41 | }); 42 | }; 43 | } else { 44 | required && console.warn("Please gsap.registerPlugin(CustomEase, CustomWiggle)"); 45 | } 46 | } 47 | }, 48 | _parseEase = function _parseEase(ease, invertNonCustomEases) { 49 | if (typeof ease !== "function") { 50 | ease = gsap.parseEase(ease) || createCustomEase("", ease); 51 | } 52 | 53 | return ease.custom || !invertNonCustomEases ? ease : function (p) { 54 | return 1 - ease(p); 55 | }; 56 | }, 57 | _bonusValidated = 1, 58 | //CustomWiggle 59 | _create = function _create(id, vars) { 60 | if (!_coreInitted) { 61 | _initCore(1); 62 | } 63 | 64 | vars = vars || {}; 65 | var wiggles = (vars.wiggles || 10) | 0, 66 | inc = 1 / wiggles, 67 | x = inc / 2, 68 | anticipate = vars.type === "anticipate", 69 | yEase = _eases[vars.type] || _eases.easeOut, 70 | xEase = _linearEase, 71 | rnd = 1000, 72 | nextX, 73 | nextY, 74 | angle, 75 | handleX, 76 | handleY, 77 | easedX, 78 | y, 79 | path, 80 | i; 81 | 82 | if (_bonusValidated) { 83 | if (anticipate) { 84 | //the anticipate ease is actually applied on the x-axis (timing) and uses easeOut for amplitude. 85 | xEase = yEase; 86 | yEase = _eases.easeOut; 87 | } 88 | 89 | if (vars.timingEase) { 90 | xEase = _parseEase(vars.timingEase); 91 | } 92 | 93 | if (vars.amplitudeEase) { 94 | yEase = _parseEase(vars.amplitudeEase, true); 95 | } 96 | 97 | easedX = xEase(x); 98 | y = anticipate ? -yEase(x) : yEase(x); 99 | path = [0, 0, easedX / 4, 0, easedX / 2, y, easedX, y]; 100 | 101 | if (vars.type === "random") { 102 | //if we just select random values on the y-axis and plug them into the "normal" algorithm, since the control points are always straight horizontal, it creates a bit of a slowdown at each anchor which just didn't seem as desirable, so we switched to an algorithm that bends the control points to be more in line with their context. 103 | path.length = 4; 104 | nextX = xEase(inc); 105 | nextY = Math.random() * 2 - 1; 106 | 107 | for (i = 2; i < wiggles; i++) { 108 | x = nextX; 109 | y = nextY; 110 | nextX = xEase(inc * i); 111 | nextY = Math.random() * 2 - 1; 112 | angle = Math.atan2(nextY - path[path.length - 3], nextX - path[path.length - 4]); 113 | handleX = Math.cos(angle) * inc; 114 | handleY = Math.sin(angle) * inc; 115 | path.push(x - handleX, y - handleY, x, y, x + handleX, y + handleY); 116 | } 117 | 118 | path.push(nextX, 0, 1, 0); 119 | } else { 120 | for (i = 1; i < wiggles; i++) { 121 | path.push(xEase(x + inc / 2), y); 122 | x += inc; 123 | y = (y > 0 ? -1 : 1) * yEase(i * inc); 124 | easedX = xEase(x); 125 | path.push(xEase(x - inc / 2), y, easedX, y); 126 | } 127 | 128 | path.push(xEase(x + inc / 4), y, xEase(x + inc / 4), 0, 1, 0); 129 | } 130 | 131 | i = path.length; 132 | 133 | while (--i > -1) { 134 | path[i] = ~~(path[i] * rnd) / rnd; //round values to avoid odd strings for super tiny values 135 | } 136 | 137 | path[2] = "C" + path[2]; 138 | return createCustomEase(id, "M" + path.join(",")); 139 | } 140 | }; 141 | 142 | export var CustomWiggle = /*#__PURE__*/function () { 143 | function CustomWiggle(id, vars) { 144 | this.ease = _create(id, vars); 145 | } 146 | 147 | CustomWiggle.create = function create(id, vars) { 148 | return _create(id, vars); 149 | }; 150 | 151 | CustomWiggle.register = function register(core) { 152 | gsap = core; 153 | 154 | _initCore(); 155 | }; 156 | 157 | return CustomWiggle; 158 | }(); 159 | _getGSAP() && gsap.registerPlugin(CustomWiggle); 160 | CustomWiggle.version = "3.13.0"; 161 | export { CustomWiggle as default }; -------------------------------------------------------------------------------- /esm/EasePack.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * EasePack 3.13.0 3 | * https://gsap.com 4 | * 5 | * @license Copyright 2008-2025, GreenSock. All rights reserved. 6 | * Subject to the terms at https://gsap.com/standard-license 7 | * @author: Jack Doyle, jack@greensock.com 8 | */ 9 | 10 | /* eslint-disable */ 11 | var gsap, 12 | _coreInitted, 13 | _registerEase, 14 | _getGSAP = function _getGSAP() { 15 | return gsap || typeof window !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap; 16 | }, 17 | _boolean = function _boolean(value, defaultValue) { 18 | return !!(typeof value === "undefined" ? defaultValue : value && !~(value + "").indexOf("false")); 19 | }, 20 | _initCore = function _initCore(core) { 21 | gsap = core || _getGSAP(); 22 | 23 | if (gsap) { 24 | _registerEase = gsap.registerEase; //add weighted ease capabilities to standard eases so users can do "power2.inOut(0.8)" for example to push everything toward the "out", or (-0.8) to push it toward the "in" (0 is neutral) 25 | 26 | var eases = gsap.parseEase(), 27 | createConfig = function createConfig(ease) { 28 | return function (ratio) { 29 | var y = 0.5 + ratio / 2; 30 | 31 | ease.config = function (p) { 32 | return ease(2 * (1 - p) * p * y + p * p); 33 | }; 34 | }; 35 | }, 36 | p; 37 | 38 | for (p in eases) { 39 | if (!eases[p].config) { 40 | createConfig(eases[p]); 41 | } 42 | } 43 | 44 | _registerEase("slow", SlowMo); 45 | 46 | _registerEase("expoScale", ExpoScaleEase); 47 | 48 | _registerEase("rough", RoughEase); 49 | 50 | for (p in EasePack) { 51 | p !== "version" && gsap.core.globals(p, EasePack[p]); 52 | } 53 | 54 | _coreInitted = 1; 55 | } 56 | }, 57 | _createSlowMo = function _createSlowMo(linearRatio, power, yoyoMode) { 58 | linearRatio = Math.min(1, linearRatio || 0.7); 59 | 60 | var pow = linearRatio < 1 ? power || power === 0 ? power : 0.7 : 0, 61 | p1 = (1 - linearRatio) / 2, 62 | p3 = p1 + linearRatio, 63 | calcEnd = _boolean(yoyoMode); 64 | 65 | return function (p) { 66 | var r = p + (0.5 - p) * pow; 67 | return p < p1 ? calcEnd ? 1 - (p = 1 - p / p1) * p : r - (p = 1 - p / p1) * p * p * p * r : p > p3 ? calcEnd ? p === 1 ? 0 : 1 - (p = (p - p3) / p1) * p : r + (p - r) * (p = (p - p3) / p1) * p * p * p : calcEnd ? 1 : r; 68 | }; 69 | }, 70 | _createExpoScale = function _createExpoScale(start, end, ease) { 71 | var p1 = Math.log(end / start), 72 | p2 = end - start; 73 | ease && (ease = gsap.parseEase(ease)); 74 | return function (p) { 75 | return (start * Math.exp(p1 * (ease ? ease(p) : p)) - start) / p2; 76 | }; 77 | }, 78 | EasePoint = function EasePoint(time, value, next) { 79 | this.t = time; 80 | this.v = value; 81 | 82 | if (next) { 83 | this.next = next; 84 | next.prev = this; 85 | this.c = next.v - value; 86 | this.gap = next.t - time; 87 | } 88 | }, 89 | _createRoughEase = function _createRoughEase(vars) { 90 | if (typeof vars !== "object") { 91 | //users may pass in via a string, like "rough(30)" 92 | vars = { 93 | points: +vars || 20 94 | }; 95 | } 96 | 97 | var taper = vars.taper || "none", 98 | a = [], 99 | cnt = 0, 100 | points = (+vars.points || 20) | 0, 101 | i = points, 102 | randomize = _boolean(vars.randomize, true), 103 | clamp = _boolean(vars.clamp), 104 | template = gsap ? gsap.parseEase(vars.template) : 0, 105 | strength = (+vars.strength || 1) * 0.4, 106 | x, 107 | y, 108 | bump, 109 | invX, 110 | obj, 111 | pnt, 112 | recent; 113 | 114 | while (--i > -1) { 115 | x = randomize ? Math.random() : 1 / points * i; 116 | y = template ? template(x) : x; 117 | 118 | if (taper === "none") { 119 | bump = strength; 120 | } else if (taper === "out") { 121 | invX = 1 - x; 122 | bump = invX * invX * strength; 123 | } else if (taper === "in") { 124 | bump = x * x * strength; 125 | } else if (x < 0.5) { 126 | //"both" (start) 127 | invX = x * 2; 128 | bump = invX * invX * 0.5 * strength; 129 | } else { 130 | //"both" (end) 131 | invX = (1 - x) * 2; 132 | bump = invX * invX * 0.5 * strength; 133 | } 134 | 135 | if (randomize) { 136 | y += Math.random() * bump - bump * 0.5; 137 | } else if (i % 2) { 138 | y += bump * 0.5; 139 | } else { 140 | y -= bump * 0.5; 141 | } 142 | 143 | if (clamp) { 144 | if (y > 1) { 145 | y = 1; 146 | } else if (y < 0) { 147 | y = 0; 148 | } 149 | } 150 | 151 | a[cnt++] = { 152 | x: x, 153 | y: y 154 | }; 155 | } 156 | 157 | a.sort(function (a, b) { 158 | return a.x - b.x; 159 | }); 160 | pnt = new EasePoint(1, 1, null); 161 | i = points; 162 | 163 | while (i--) { 164 | obj = a[i]; 165 | pnt = new EasePoint(obj.x, obj.y, pnt); 166 | } 167 | 168 | recent = new EasePoint(0, 0, pnt.t ? pnt : pnt.next); 169 | return function (p) { 170 | var pnt = recent; 171 | 172 | if (p > pnt.t) { 173 | while (pnt.next && p >= pnt.t) { 174 | pnt = pnt.next; 175 | } 176 | 177 | pnt = pnt.prev; 178 | } else { 179 | while (pnt.prev && p <= pnt.t) { 180 | pnt = pnt.prev; 181 | } 182 | } 183 | 184 | recent = pnt; 185 | return pnt.v + (p - pnt.t) / pnt.gap * pnt.c; 186 | }; 187 | }; 188 | 189 | export var SlowMo = _createSlowMo(0.7); 190 | SlowMo.ease = SlowMo; //for backward compatibility 191 | 192 | SlowMo.config = _createSlowMo; 193 | export var ExpoScaleEase = _createExpoScale(1, 2); 194 | ExpoScaleEase.config = _createExpoScale; 195 | export var RoughEase = _createRoughEase(); 196 | RoughEase.ease = RoughEase; //for backward compatibility 197 | 198 | RoughEase.config = _createRoughEase; 199 | export var EasePack = { 200 | SlowMo: SlowMo, 201 | RoughEase: RoughEase, 202 | ExpoScaleEase: ExpoScaleEase 203 | }; 204 | 205 | for (var p in EasePack) { 206 | EasePack[p].register = _initCore; 207 | EasePack[p].version = "3.13.0"; 208 | } 209 | 210 | _getGSAP() && gsap.registerPlugin(SlowMo); 211 | export { EasePack as default }; -------------------------------------------------------------------------------- /esm/Physics2DPlugin.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Physics2DPlugin 3.13.0 3 | * https://gsap.com 4 | * 5 | * @license Copyright 2008-2025, GreenSock. All rights reserved. 6 | * Subject to the terms at https://gsap.com/standard-license 7 | * @author: Jack Doyle, jack@greensock.com 8 | */ 9 | 10 | /* eslint-disable */ 11 | var gsap, 12 | _coreInitted, 13 | _getUnit, 14 | _getStyleSaver, 15 | _reverting, 16 | _DEG2RAD = Math.PI / 180, 17 | _getGSAP = function _getGSAP() { 18 | return gsap || typeof window !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap; 19 | }, 20 | _round = function _round(value) { 21 | return Math.round(value * 10000) / 10000; 22 | }, 23 | _bonusValidated = 1, 24 | //Physics2DPlugin 25 | _initCore = function _initCore(core) { 26 | gsap = core || _getGSAP(); 27 | 28 | if (!_coreInitted) { 29 | _getUnit = gsap.utils.getUnit; 30 | _getStyleSaver = gsap.core.getStyleSaver; 31 | 32 | _reverting = gsap.core.reverting || function () {}; 33 | 34 | _coreInitted = 1; 35 | } 36 | }; 37 | 38 | var PhysicsProp = function PhysicsProp(target, p, velocity, acceleration, stepsPerTimeUnit) { 39 | var cache = target._gsap, 40 | curVal = cache.get(target, p); 41 | this.p = p; 42 | this.set = cache.set(target, p); //setter 43 | 44 | this.s = this.val = parseFloat(curVal); 45 | this.u = _getUnit(curVal) || 0; 46 | this.vel = velocity || 0; 47 | this.v = this.vel / stepsPerTimeUnit; 48 | 49 | if (acceleration || acceleration === 0) { 50 | this.acc = acceleration; 51 | this.a = this.acc / (stepsPerTimeUnit * stepsPerTimeUnit); 52 | } else { 53 | this.acc = this.a = 0; 54 | } 55 | }; 56 | 57 | export var Physics2DPlugin = { 58 | version: "3.13.0", 59 | name: "physics2D", 60 | register: _initCore, 61 | init: function init(target, value, tween) { 62 | _coreInitted || _initCore(); 63 | var data = this, 64 | angle = +value.angle || 0, 65 | velocity = +value.velocity || 0, 66 | acceleration = +value.acceleration || 0, 67 | xProp = value.xProp || "x", 68 | yProp = value.yProp || "y", 69 | aAngle = value.accelerationAngle || value.accelerationAngle === 0 ? +value.accelerationAngle : angle; 70 | data.styles = _getStyleSaver && _getStyleSaver(target, value.xProp && value.xProp !== "x" ? value.xProp + "," + value.yProp : "transform"); 71 | data.target = target; 72 | data.tween = tween; 73 | data.step = 0; 74 | data.sps = 30; //steps per second 75 | 76 | if (value.gravity) { 77 | acceleration = +value.gravity; 78 | aAngle = 90; 79 | } 80 | 81 | angle *= _DEG2RAD; 82 | aAngle *= _DEG2RAD; 83 | data.fr = 1 - (+value.friction || 0); 84 | 85 | data._props.push(xProp, yProp); 86 | 87 | data.xp = new PhysicsProp(target, xProp, Math.cos(angle) * velocity, Math.cos(aAngle) * acceleration, data.sps); 88 | data.yp = new PhysicsProp(target, yProp, Math.sin(angle) * velocity, Math.sin(aAngle) * acceleration, data.sps); 89 | data.skipX = data.skipY = 0; 90 | }, 91 | render: function render(ratio, data) { 92 | var xp = data.xp, 93 | yp = data.yp, 94 | tween = data.tween, 95 | target = data.target, 96 | step = data.step, 97 | sps = data.sps, 98 | fr = data.fr, 99 | skipX = data.skipX, 100 | skipY = data.skipY, 101 | time = tween._from ? tween._dur - tween._time : tween._time, 102 | x, 103 | y, 104 | tt, 105 | steps, 106 | remainder, 107 | i; 108 | 109 | if (tween._time || !_reverting()) { 110 | if (fr === 1) { 111 | tt = time * time * 0.5; 112 | x = xp.s + xp.vel * time + xp.acc * tt; 113 | y = yp.s + yp.vel * time + yp.acc * tt; 114 | } else { 115 | time *= sps; 116 | steps = i = (time | 0) - step; 117 | /* 118 | Note: rounding errors build up if we walk the calculations backward which we used to do like this to maximize performance: 119 | i = -i; 120 | while (i--) { 121 | xp.val -= xp.v; 122 | yp.val -= yp.v; 123 | xp.v /= fr; 124 | yp.v /= fr; 125 | xp.v -= xp.a; 126 | yp.v -= yp.a; 127 | } 128 | but now for the sake of accuracy (to ensure rewinding always goes back to EXACTLY the same spot), we force the calculations to go forward every time. So if the tween is going backward, we just start from the beginning and iterate. This is only necessary with friction. 129 | */ 130 | 131 | if (i < 0) { 132 | xp.v = xp.vel / sps; 133 | yp.v = yp.vel / sps; 134 | xp.val = xp.s; 135 | yp.val = yp.s; 136 | data.step = 0; 137 | steps = i = time | 0; 138 | } 139 | 140 | remainder = time % 1 * fr; 141 | 142 | while (i--) { 143 | xp.v += xp.a; 144 | yp.v += yp.a; 145 | xp.v *= fr; 146 | yp.v *= fr; 147 | xp.val += xp.v; 148 | yp.val += yp.v; 149 | } 150 | 151 | x = xp.val + xp.v * remainder; 152 | y = yp.val + yp.v * remainder; 153 | data.step += steps; 154 | } 155 | 156 | skipX || xp.set(target, xp.p, _round(x) + xp.u); 157 | skipY || yp.set(target, yp.p, _round(y) + yp.u); 158 | } else { 159 | data.styles.revert(); 160 | } 161 | }, 162 | kill: function kill(property) { 163 | if (this.xp.p === property) { 164 | this.skipX = 1; 165 | } 166 | 167 | if (this.yp.p === property) { 168 | this.skipY = 1; 169 | } 170 | } 171 | }; 172 | _getGSAP() && gsap.registerPlugin(Physics2DPlugin); 173 | export { Physics2DPlugin as default }; -------------------------------------------------------------------------------- /esm/PhysicsPropsPlugin.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * PhysicsPropsPlugin 3.13.0 3 | * https://gsap.com 4 | * 5 | * @license Copyright 2008-2025, GreenSock. All rights reserved. 6 | * Subject to the terms at https://gsap.com/standard-license 7 | * @author: Jack Doyle, jack@greensock.com 8 | */ 9 | 10 | /* eslint-disable */ 11 | var gsap, 12 | _coreInitted, 13 | _getUnit, 14 | _getStyleSaver, 15 | _reverting, 16 | _getGSAP = function _getGSAP() { 17 | return gsap || typeof window !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap; 18 | }, 19 | _round = function _round(value) { 20 | return Math.round(value * 10000) / 10000; 21 | }, 22 | _bonusValidated = 1, 23 | //PhysicsPropsPlugin 24 | _initCore = function _initCore(core) { 25 | gsap = core || _getGSAP(); 26 | 27 | if (!_coreInitted) { 28 | _getUnit = gsap.utils.getUnit; 29 | _getStyleSaver = gsap.core.getStyleSaver; 30 | 31 | _reverting = gsap.core.reverting || function () {}; 32 | 33 | _coreInitted = 1; 34 | } 35 | }; 36 | 37 | var PhysicsProp = function PhysicsProp(target, p, velocity, acceleration, friction, stepsPerTimeUnit) { 38 | var cache = target._gsap, 39 | curVal = cache.get(target, p); 40 | this.p = p; 41 | this.set = cache.set(target, p); //setter 42 | 43 | this.s = this.val = parseFloat(curVal); 44 | this.u = _getUnit(curVal) || 0; 45 | this.vel = velocity || 0; 46 | this.v = this.vel / stepsPerTimeUnit; 47 | 48 | if (acceleration || acceleration === 0) { 49 | this.acc = acceleration; 50 | this.a = this.acc / (stepsPerTimeUnit * stepsPerTimeUnit); 51 | } else { 52 | this.acc = this.a = 0; 53 | } 54 | 55 | this.fr = 1 - (friction || 0); 56 | }; 57 | 58 | export var PhysicsPropsPlugin = { 59 | version: "3.13.0", 60 | name: "physicsProps", 61 | register: _initCore, 62 | init: function init(target, value, tween) { 63 | _coreInitted || _initCore(); 64 | var data = this, 65 | p; 66 | data.styles = _getStyleSaver && _getStyleSaver(target); 67 | data.target = target; 68 | data.tween = tween; 69 | data.step = 0; 70 | data.sps = 30; //steps per second 71 | 72 | data.vProps = []; 73 | 74 | for (p in value) { 75 | var _value$p = value[p], 76 | velocity = _value$p.velocity, 77 | acceleration = _value$p.acceleration, 78 | friction = _value$p.friction; 79 | 80 | if (velocity || acceleration) { 81 | data.vProps.push(new PhysicsProp(target, p, velocity, acceleration, friction, data.sps)); 82 | 83 | data._props.push(p); 84 | 85 | _getStyleSaver && data.styles.save(p); 86 | friction && (data.hasFr = 1); 87 | } 88 | } 89 | }, 90 | render: function render(ratio, data) { 91 | var vProps = data.vProps, 92 | tween = data.tween, 93 | target = data.target, 94 | step = data.step, 95 | hasFr = data.hasFr, 96 | sps = data.sps, 97 | i = vProps.length, 98 | time = tween._from ? tween._dur - tween._time : tween._time, 99 | curProp, 100 | steps, 101 | remainder, 102 | j, 103 | tt; 104 | 105 | if (tween._time || !_reverting()) { 106 | if (hasFr) { 107 | time *= sps; 108 | steps = (time | 0) - step; 109 | /* 110 | Note: rounding errors build up if we walk the calculations backward which we used to do like this to maximize performance: 111 | while (i--) { 112 | curProp = vProps[i]; 113 | j = -steps; 114 | while (j--) { 115 | curProp.val -= curProp.v; 116 | curProp.v /= curProp.fr; 117 | curProp.v -= curProp.a; 118 | } 119 | curProp.set(target, curProp.p, _round(curProp.val + (curProp.v * remainder * curProp.fr)) + curProp.u); 120 | } 121 | but now for the sake of accuracy (to ensure rewinding always goes back to EXACTLY the same spot), we force the calculations to go forward every time. So if the tween is going backward, we just start from the beginning and iterate. This is only necessary with friction. 122 | */ 123 | 124 | if (steps < 0) { 125 | while (i--) { 126 | curProp = vProps[i]; 127 | curProp.v = curProp.vel / sps; 128 | curProp.val = curProp.s; 129 | } 130 | 131 | i = vProps.length; 132 | data.step = step = 0; 133 | steps = time | 0; 134 | } 135 | 136 | remainder = time % 1; 137 | 138 | while (i--) { 139 | curProp = vProps[i]; 140 | j = steps; 141 | 142 | while (j--) { 143 | curProp.v += curProp.a; 144 | curProp.v *= curProp.fr; 145 | curProp.val += curProp.v; 146 | } 147 | 148 | curProp.set(target, curProp.p, _round(curProp.val + curProp.v * remainder * curProp.fr) + curProp.u); 149 | } 150 | 151 | data.step += steps; 152 | } else { 153 | tt = time * time * 0.5; 154 | 155 | while (i--) { 156 | curProp = vProps[i]; 157 | curProp.set(target, curProp.p, _round(curProp.s + curProp.vel * time + curProp.acc * tt) + curProp.u); 158 | } 159 | } 160 | } else { 161 | data.styles.revert(); 162 | } 163 | }, 164 | kill: function kill(property) { 165 | var vProps = this.vProps, 166 | i = vProps.length; 167 | 168 | while (i--) { 169 | vProps[i].p === property && vProps.splice(i, 1); 170 | } 171 | } 172 | }; 173 | _getGSAP() && gsap.registerPlugin(PhysicsPropsPlugin); 174 | export { PhysicsPropsPlugin as default }; -------------------------------------------------------------------------------- /esm/TextPlugin.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * TextPlugin 3.13.0 3 | * https://gsap.com 4 | * 5 | * @license Copyright 2008-2025, GreenSock. All rights reserved. 6 | * Subject to the terms at https://gsap.com/standard-license 7 | * @author: Jack Doyle, jack@greensock.com 8 | */ 9 | 10 | /* eslint-disable */ 11 | import { emojiSafeSplit, getText, splitInnerHTML } from "./utils/strings.js"; 12 | 13 | var gsap, 14 | _tempDiv, 15 | _getGSAP = function _getGSAP() { 16 | return gsap || typeof window !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap; 17 | }; 18 | 19 | export var TextPlugin = { 20 | version: "3.13.0", 21 | name: "text", 22 | init: function init(target, value, tween) { 23 | typeof value !== "object" && (value = { 24 | value: value 25 | }); 26 | 27 | var i = target.nodeName.toUpperCase(), 28 | data = this, 29 | _value = value, 30 | newClass = _value.newClass, 31 | oldClass = _value.oldClass, 32 | preserveSpaces = _value.preserveSpaces, 33 | rtl = _value.rtl, 34 | delimiter = data.delimiter = value.delimiter || "", 35 | fillChar = data.fillChar = value.fillChar || (value.padSpace ? " " : ""), 36 | _short, 37 | text, 38 | original, 39 | j, 40 | condensedText, 41 | condensedOriginal, 42 | aggregate, 43 | s; 44 | 45 | data.svg = target.getBBox && (i === "TEXT" || i === "TSPAN"); 46 | 47 | if (!("innerHTML" in target) && !data.svg) { 48 | return false; 49 | } 50 | 51 | data.target = target; 52 | 53 | if (!("value" in value)) { 54 | data.text = data.original = [""]; 55 | return; 56 | } 57 | 58 | original = splitInnerHTML(target, delimiter, false, preserveSpaces, data.svg); 59 | _tempDiv || (_tempDiv = document.createElement("div")); 60 | _tempDiv.innerHTML = value.value; 61 | text = splitInnerHTML(_tempDiv, delimiter, false, preserveSpaces, data.svg); 62 | data.from = tween._from; 63 | 64 | if ((data.from || rtl) && !(rtl && data.from)) { 65 | // right-to-left or "from()" tweens should invert things (but if it's BOTH .from() and rtl, inverting twice equals not inverting at all :) 66 | i = original; 67 | original = text; 68 | text = i; 69 | } 70 | 71 | data.hasClass = !!(newClass || oldClass); 72 | data.newClass = rtl ? oldClass : newClass; 73 | data.oldClass = rtl ? newClass : oldClass; 74 | i = original.length - text.length; 75 | _short = i < 0 ? original : text; 76 | 77 | if (i < 0) { 78 | i = -i; 79 | } 80 | 81 | while (--i > -1) { 82 | _short.push(fillChar); 83 | } 84 | 85 | if (value.type === "diff") { 86 | j = 0; 87 | condensedText = []; 88 | condensedOriginal = []; 89 | aggregate = ""; 90 | 91 | for (i = 0; i < text.length; i++) { 92 | s = text[i]; 93 | 94 | if (s === original[i]) { 95 | aggregate += s; 96 | } else { 97 | condensedText[j] = aggregate + s; 98 | condensedOriginal[j++] = aggregate + original[i]; 99 | aggregate = ""; 100 | } 101 | } 102 | 103 | text = condensedText; 104 | original = condensedOriginal; 105 | 106 | if (aggregate) { 107 | text.push(aggregate); 108 | original.push(aggregate); 109 | } 110 | } 111 | 112 | value.speed && tween.duration(Math.min(0.05 / value.speed * _short.length, value.maxDuration || 9999)); 113 | data.rtl = rtl; 114 | data.original = original; 115 | data.text = text; 116 | 117 | data._props.push("text"); 118 | }, 119 | render: function render(ratio, data) { 120 | if (ratio > 1) { 121 | ratio = 1; 122 | } else if (ratio < 0) { 123 | ratio = 0; 124 | } 125 | 126 | if (data.from) { 127 | ratio = 1 - ratio; 128 | } 129 | 130 | var text = data.text, 131 | hasClass = data.hasClass, 132 | newClass = data.newClass, 133 | oldClass = data.oldClass, 134 | delimiter = data.delimiter, 135 | target = data.target, 136 | fillChar = data.fillChar, 137 | original = data.original, 138 | rtl = data.rtl, 139 | l = text.length, 140 | i = (rtl ? 1 - ratio : ratio) * l + 0.5 | 0, 141 | applyNew, 142 | applyOld, 143 | str; 144 | 145 | if (hasClass && ratio) { 146 | applyNew = newClass && i; 147 | applyOld = oldClass && i !== l; 148 | str = (applyNew ? "" : "") + text.slice(0, i).join(delimiter) + (applyNew ? "" : "") + (applyOld ? "" : "") + delimiter + original.slice(i).join(delimiter) + (applyOld ? "" : ""); 149 | } else { 150 | str = text.slice(0, i).join(delimiter) + delimiter + original.slice(i).join(delimiter); 151 | } 152 | 153 | if (data.svg) { 154 | //SVG text elements don't have an "innerHTML" in Microsoft browsers. 155 | target.textContent = str; 156 | } else { 157 | target.innerHTML = fillChar === " " && ~str.indexOf(" ") ? str.split(" ").join("  ") : str; 158 | } 159 | } 160 | }; 161 | TextPlugin.splitInnerHTML = splitInnerHTML; 162 | TextPlugin.emojiSafeSplit = emojiSafeSplit; 163 | TextPlugin.getText = getText; 164 | _getGSAP() && gsap.registerPlugin(TextPlugin); 165 | export { TextPlugin as default }; -------------------------------------------------------------------------------- /esm/all.js: -------------------------------------------------------------------------------- 1 | import gsap from "./gsap-core.js"; 2 | import CSSPlugin from "./CSSPlugin.js"; 3 | var gsapWithCSS = gsap.registerPlugin(CSSPlugin) || gsap, 4 | // to protect from tree shaking 5 | TweenMaxWithCSS = gsapWithCSS.core.Tween; 6 | export { gsapWithCSS as gsap, gsapWithCSS as default, TweenMaxWithCSS as TweenMax, CSSPlugin }; 7 | export { TweenLite, TimelineMax, TimelineLite, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ, wrap, wrapYoyo, distribute, random, snap, normalize, getUnit, clamp, splitColor, toArray, mapRange, pipe, unitize, interpolate, shuffle, selector } from "./gsap-core.js"; 8 | export * from "./CustomEase.js"; 9 | export * from "./Draggable.js"; 10 | export * from "./CSSRulePlugin.js"; 11 | export * from "./EaselPlugin.js"; 12 | export * from "./EasePack.js"; 13 | export * from "./Flip.js"; 14 | export * from "./MotionPathPlugin.js"; 15 | export * from "./Observer.js"; 16 | export * from "./PixiPlugin.js"; 17 | export * from "./ScrollToPlugin.js"; 18 | export * from "./ScrollTrigger.js"; 19 | export * from "./TextPlugin.js"; 20 | export * from "./DrawSVGPlugin.js"; 21 | export * from "./Physics2DPlugin.js"; 22 | export * from "./PhysicsPropsPlugin.js"; 23 | export * from "./ScrambleTextPlugin.js"; 24 | export * from "./CustomBounce.js"; 25 | export * from "./CustomWiggle.js"; 26 | export * from "./GSDevTools.js"; 27 | export * from "./InertiaPlugin.js"; 28 | export * from "./MorphSVGPlugin.js"; 29 | export * from "./MotionPathHelper.js"; 30 | export * from "./ScrollSmoother.js"; 31 | export * from "./SplitText.js"; -------------------------------------------------------------------------------- /esm/index.js: -------------------------------------------------------------------------------- 1 | import { gsap, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ, TweenLite, TimelineLite, TimelineMax } from "./gsap-core.js"; 2 | import { CSSPlugin } from "./CSSPlugin.js"; 3 | var gsapWithCSS = gsap.registerPlugin(CSSPlugin) || gsap, 4 | // to protect from tree shaking 5 | TweenMaxWithCSS = gsapWithCSS.core.Tween; 6 | export { gsapWithCSS as gsap, gsapWithCSS as default, CSSPlugin, TweenMaxWithCSS as TweenMax, TweenLite, TimelineMax, TimelineLite, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ }; -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gsap", 3 | "version": "3.13.0", 4 | "description": "GSAP is a robust JavaScript toolset that turns developers into animation superheroes. Build high-performance animations that work in **every** major browser. Animate CSS, SVG, canvas, React, Vue, WebGL, colors, strings, motion paths, generic objects...anything JavaScript can touch! The ScrollTrigger plugin lets you create jaw-dropping scroll-based animations with minimal code. No other library delivers such advanced sequencing, reliability, and tight control while solving real-world problems on millions of sites. GSAP works around countless browser inconsistencies; your animations **just work**. At its core, GSAP is a high-speed property manipulator, updating values over time with extreme accuracy. It's up to 20x faster than jQuery!", 5 | "homepage": "https://gsap.com", 6 | "module": "esm/index.js", 7 | "main": "dist/gsap.js", 8 | "types": "types/index.d.ts", 9 | "filename": "gsap.min.js", 10 | "sideEffects": false, 11 | "keywords": [ 12 | "GSAP", 13 | "GreenSock", 14 | "animation", 15 | "MotionPathPlugin", 16 | "motion", 17 | "motionPath", 18 | "ScrollTrigger", 19 | "ScrollSmoother", 20 | "Observer", 21 | "easing", 22 | "JavaScript", 23 | "PixiPlugin", 24 | "CustomEase", 25 | "Flip", 26 | "SVG", 27 | "3D", 28 | "2D", 29 | "transform", 30 | "morph", 31 | "morphing", 32 | "tweening", 33 | "Webflow" 34 | ], 35 | "maintainers": [ 36 | { 37 | "name": "Jack Doyle", 38 | "email": "jack@greensock.com", 39 | "web": "https://gsap.com" 40 | } 41 | ], 42 | "license": "Standard 'no charge' license: https://gsap.com/standard-license.", 43 | "bugs": { 44 | "url": "https://gsap.com/community/" 45 | }, 46 | "repository": { 47 | "type": "git", 48 | "url": "https://github.com/greensock/GSAP" 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /src/CSSRulePlugin.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * CSSRulePlugin 3.13.0 3 | * https://gsap.com 4 | * 5 | * @license Copyright 2008-2025, GreenSock. All rights reserved. 6 | * Subject to the terms at https://gsap.com/standard-license 7 | * @author: Jack Doyle, jack@greensock.com 8 | */ 9 | /* eslint-disable */ 10 | 11 | let gsap, _coreInitted, _win, _doc, CSSPlugin, 12 | _windowExists = () => typeof(window) !== "undefined", 13 | _getGSAP = () => gsap || (_windowExists() && (gsap = window.gsap) && gsap.registerPlugin && gsap), 14 | _checkRegister = () => { 15 | if (!_coreInitted) { 16 | _initCore(); 17 | if (!CSSPlugin) { 18 | console.warn("Please gsap.registerPlugin(CSSPlugin, CSSRulePlugin)"); 19 | } 20 | } 21 | return _coreInitted; 22 | }, 23 | _initCore = core => { 24 | gsap = core || _getGSAP(); 25 | if (_windowExists()) { 26 | _win = window; 27 | _doc = document; 28 | } 29 | if (gsap) { 30 | CSSPlugin = gsap.plugins.css; 31 | if (CSSPlugin) { 32 | _coreInitted = 1; 33 | } 34 | } 35 | }; 36 | 37 | 38 | export const CSSRulePlugin = { 39 | version: "3.13.0", 40 | name: "cssRule", 41 | init(target, value, tween, index, targets) { 42 | if (!_checkRegister() || typeof(target.cssText) === "undefined") { 43 | return false; 44 | } 45 | let div = target._gsProxy = target._gsProxy || _doc.createElement("div"); 46 | this.ss = target; 47 | this.style = div.style; 48 | div.style.cssText = target.cssText; 49 | CSSPlugin.prototype.init.call(this, div, value, tween, index, targets); //we just offload all the work to the regular CSSPlugin and then copy the cssText back over to the rule in the render() method. This allows us to have all of the updates to CSSPlugin automatically flow through to CSSRulePlugin instead of having to maintain both 50 | }, 51 | render(ratio, data) { 52 | let pt = data._pt, 53 | style = data.style, 54 | ss = data.ss, 55 | i; 56 | while (pt) { 57 | pt.r(ratio, pt.d); 58 | pt = pt._next; 59 | } 60 | i = style.length; 61 | while (--i > -1) { 62 | ss[style[i]] = style[style[i]]; 63 | } 64 | }, 65 | getRule(selector) { 66 | _checkRegister(); 67 | let ruleProp = _doc.all ? "rules" : "cssRules", 68 | styleSheets = _doc.styleSheets, 69 | i = styleSheets.length, 70 | pseudo = (selector.charAt(0) === ":"), 71 | j, curSS, cs, a; 72 | selector = (pseudo ? "" : ",") + selector.split("::").join(":").toLowerCase() + ","; //note: old versions of IE report tag name selectors as upper case, so we just change everything to lowercase. 73 | if (pseudo) { 74 | a = []; 75 | } 76 | while (i--) { 77 | //Firefox may throw insecure operation errors when css is loaded from other domains, so try/catch. 78 | try { 79 | curSS = styleSheets[i][ruleProp]; 80 | if (!curSS) { 81 | continue; 82 | } 83 | j = curSS.length; 84 | } catch (e) { 85 | console.warn(e); 86 | continue; 87 | } 88 | while (--j > -1) { 89 | cs = curSS[j]; 90 | if (cs.selectorText && ("," + cs.selectorText.split("::").join(":").toLowerCase() + ",").indexOf(selector) !== -1) { //note: IE adds an extra ":" to pseudo selectors, so .myClass:after becomes .myClass::after, so we need to strip the extra one out. 91 | if (pseudo) { 92 | a.push(cs.style); 93 | } else { 94 | return cs.style; 95 | } 96 | } 97 | } 98 | } 99 | return a; 100 | }, 101 | register: _initCore 102 | }; 103 | 104 | _getGSAP() && gsap.registerPlugin(CSSRulePlugin); 105 | 106 | export { CSSRulePlugin as default }; -------------------------------------------------------------------------------- /src/CustomBounce.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * CustomBounce 3.13.0 3 | * https://gsap.com 4 | * 5 | * @license Copyright 2008-2025, GreenSock. All rights reserved. 6 | * Subject to the terms at https://gsap.com/standard-license 7 | * @author: Jack Doyle, jack@greensock.com 8 | */ 9 | /* eslint-disable */ 10 | 11 | let gsap, _coreInitted, createCustomEase, 12 | _getGSAP = () => gsap || (typeof(window) !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap), 13 | _initCore = required => { 14 | gsap = _getGSAP(); 15 | createCustomEase = gsap && gsap.parseEase("_CE"); 16 | if (createCustomEase) { 17 | _coreInitted = 1; 18 | gsap.parseEase("bounce").config = vars => typeof(vars) === "object" ? _create("", vars) : _create("bounce(" + vars + ")", {strength:+vars}); 19 | } else { 20 | required && console.warn("Please gsap.registerPlugin(CustomEase, CustomBounce)"); 21 | } 22 | }, 23 | _normalizeX = a => { //scales all the x values in an array [x, y, x, y...] AND rounds them to the closest hundredth (decimal) 24 | let l = a.length, 25 | s = 1 / a[l - 2], 26 | rnd = 1000, 27 | i; 28 | for (i = 2; i < l; i += 2) { 29 | a[i] = ~~(a[i] * s * rnd) / rnd; 30 | } 31 | a[l - 2] = 1; //in case there are any rounding errors. x should always end at 1. 32 | }, 33 | _bonusValidated = 1, //CustomBounce 34 | _create = (id, vars) => { 35 | if (!_coreInitted) { 36 | _initCore(1); 37 | } 38 | vars = vars || {}; 39 | if (_bonusValidated) { 40 | let max = 0.999, 41 | decay = Math.min(max, vars.strength || 0.7), // Math.min(0.999, 1 - 0.3 / (vars.strength || 1)), 42 | decayX = decay, 43 | gap = (vars.squash || 0) / 100, 44 | originalGap = gap, 45 | slope = 1 / 0.03, 46 | w = 0.2, 47 | h = 1, 48 | prevX = 0.1, 49 | path = [0, 0, 0.07, 0, 0.1, 1, 0.1, 1], 50 | squashPath = [0, 0, 0, 0, 0.1, 0, 0.1, 0], 51 | cp1, cp2, x, y, i, nextX, squishMagnitude; 52 | for (i = 0; i < 200; i++) { 53 | w *= decayX * ((decayX + 1) / 2); 54 | h *= decay * decay; 55 | nextX = prevX + w; 56 | x = prevX + w * 0.49; 57 | y = 1 - h; 58 | cp1 = prevX + h / slope; 59 | cp2 = x + (x - cp1) * 0.8; 60 | 61 | if (gap) { 62 | prevX += gap; 63 | cp1 += gap; 64 | x += gap; 65 | cp2 += gap; 66 | nextX += gap; 67 | squishMagnitude = gap / originalGap; 68 | squashPath.push( 69 | prevX - gap, 0, 70 | prevX - gap, squishMagnitude, 71 | prevX - gap / 2, squishMagnitude, //center peak anchor 72 | prevX, squishMagnitude, 73 | prevX, 0, 74 | prevX, 0, //base anchor 75 | prevX, squishMagnitude * -0.6, 76 | prevX + (nextX - prevX) / 6, 0, 77 | nextX, 0 78 | ); 79 | path.push(prevX - gap, 1, 80 | prevX, 1, 81 | prevX, 1); 82 | gap *= decay * decay; 83 | } 84 | 85 | path.push(prevX, 1, 86 | cp1, y, 87 | x, y, 88 | cp2, y, 89 | nextX, 1, 90 | nextX, 1); 91 | 92 | decay *= 0.95; 93 | slope = h / (nextX - cp2); 94 | prevX = nextX; 95 | if (y > max) { 96 | break; 97 | } 98 | } 99 | 100 | if (vars.endAtStart && vars.endAtStart !== "false") { 101 | x = -0.1; 102 | path.unshift(x, 1, x, 1, -0.07, 0); 103 | if (originalGap) { 104 | gap = originalGap * 2.5; //make the initial anticipation squash longer (more realistic) 105 | x -= gap; 106 | path.unshift(x, 1, x, 1, x, 1); 107 | squashPath.splice(0, 6); 108 | squashPath.unshift(x, 0, x, 0, x, 1, x + gap / 2, 1, x + gap, 1, x + gap, 0, x + gap, 0, x + gap, -0.6, x + gap + 0.033, 0); 109 | for (i = 0; i < squashPath.length; i+=2) { 110 | squashPath[i] -= x; 111 | } 112 | } 113 | for (i = 0; i < path.length; i+=2) { 114 | path[i] -= x; 115 | path[i+1] = 1 - path[i+1]; 116 | } 117 | } 118 | if (gap) { 119 | _normalizeX(squashPath); 120 | squashPath[2] = "C" + squashPath[2]; 121 | createCustomEase(vars.squashID || (id + "-squash"), "M" + squashPath.join(",")); 122 | } 123 | _normalizeX(path); 124 | path[2] = "C" + path[2]; 125 | return createCustomEase(id, "M" + path.join(",")); 126 | } 127 | }; 128 | 129 | export class CustomBounce { 130 | 131 | constructor(id, vars) { 132 | this.ease = _create(id, vars); 133 | } 134 | 135 | static create(id, vars) { 136 | return _create(id, vars); 137 | } 138 | 139 | static register(core) { 140 | gsap = core; 141 | _initCore(); 142 | } 143 | 144 | } 145 | 146 | _getGSAP() && gsap.registerPlugin(CustomBounce); 147 | 148 | CustomBounce.version = "3.13.0"; 149 | 150 | export { CustomBounce as default }; -------------------------------------------------------------------------------- /src/CustomWiggle.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * CustomWiggle 3.13.0 3 | * https://gsap.com 4 | * 5 | * @license Copyright 2008-2025, GreenSock. All rights reserved. 6 | * Subject to the terms at https://gsap.com/standard-license 7 | * @author: Jack Doyle, jack@greensock.com 8 | */ 9 | /* eslint-disable */ 10 | 11 | let gsap, _coreInitted, createCustomEase, 12 | _getGSAP = () => gsap || (typeof(window) !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap), 13 | _eases = { 14 | easeOut: "M0,1,C0.7,1,0.6,0,1,0", 15 | easeInOut: "M0,0,C0.1,0,0.24,1,0.444,1,0.644,1,0.6,0,1,0", 16 | anticipate: "M0,0,C0,0.222,0.024,0.386,0,0.4,0.18,0.455,0.65,0.646,0.7,0.67,0.9,0.76,1,0.846,1,1", 17 | uniform: "M0,0,C0,0.95,0,1,0,1,0,1,1,1,1,1,1,1,1,0,1,0" 18 | }, 19 | _linearEase = p => p, 20 | _initCore = required => { 21 | if (!_coreInitted) { 22 | gsap = _getGSAP(); 23 | createCustomEase = gsap && gsap.parseEase("_CE"); 24 | if (createCustomEase) { 25 | for (let p in _eases) { 26 | _eases[p] = createCustomEase("", _eases[p]); 27 | } 28 | _coreInitted = 1; 29 | _create("wiggle").config = vars => typeof(vars) === "object" ? _create("", vars) : _create("wiggle(" + vars + ")", {wiggles:+vars}); 30 | } else { 31 | required && console.warn("Please gsap.registerPlugin(CustomEase, CustomWiggle)"); 32 | } 33 | } 34 | }, 35 | _parseEase = (ease, invertNonCustomEases) => { 36 | if (typeof(ease) !== "function") { 37 | ease = gsap.parseEase(ease) || createCustomEase("", ease); 38 | } 39 | return (ease.custom || !invertNonCustomEases) ? ease : p => 1 - ease(p); 40 | }, 41 | _bonusValidated = 1, //CustomWiggle 42 | _create = (id, vars) => { 43 | if (!_coreInitted) { 44 | _initCore(1); 45 | } 46 | vars = vars || {}; 47 | let wiggles = (vars.wiggles || 10) | 0, 48 | inc = 1 / wiggles, 49 | x = inc / 2, 50 | anticipate = (vars.type === "anticipate"), 51 | yEase = _eases[vars.type] || _eases.easeOut, 52 | xEase = _linearEase, 53 | rnd = 1000, 54 | nextX, nextY, angle, handleX, handleY, easedX, y, path, i; 55 | if (_bonusValidated) { 56 | if (anticipate) { //the anticipate ease is actually applied on the x-axis (timing) and uses easeOut for amplitude. 57 | xEase = yEase; 58 | yEase = _eases.easeOut; 59 | } 60 | if (vars.timingEase) { 61 | xEase = _parseEase(vars.timingEase); 62 | } 63 | if (vars.amplitudeEase) { 64 | yEase = _parseEase(vars.amplitudeEase, true); 65 | } 66 | easedX = xEase(x); 67 | y = anticipate ? -yEase(x) : yEase(x); 68 | path = [0, 0, easedX / 4, 0, easedX / 2, y, easedX, y]; 69 | 70 | if (vars.type === "random") { //if we just select random values on the y-axis and plug them into the "normal" algorithm, since the control points are always straight horizontal, it creates a bit of a slowdown at each anchor which just didn't seem as desirable, so we switched to an algorithm that bends the control points to be more in line with their context. 71 | path.length = 4; 72 | nextX = xEase(inc); 73 | nextY = Math.random() * 2 - 1; 74 | for (i = 2; i < wiggles; i++) { 75 | x = nextX; 76 | y = nextY; 77 | nextX = xEase(inc * i); 78 | nextY = Math.random() * 2 - 1; 79 | angle = Math.atan2(nextY - path[path.length - 3], nextX - path[path.length - 4]); 80 | handleX = Math.cos(angle) * inc; 81 | handleY = Math.sin(angle) * inc; 82 | path.push(x - handleX, y - handleY, x, y, x + handleX, y + handleY); 83 | } 84 | path.push(nextX, 0, 1, 0); 85 | } else { 86 | for (i = 1; i < wiggles; i++) { 87 | path.push(xEase(x + inc / 2), y); 88 | x += inc; 89 | y = ((y > 0) ? -1 : 1) * (yEase(i * inc)); 90 | easedX = xEase(x); 91 | path.push(xEase(x - inc / 2), y, easedX, y); 92 | } 93 | path.push(xEase(x + inc / 4), y, xEase(x + inc / 4), 0, 1, 0); 94 | } 95 | i = path.length; 96 | while (--i > -1) { 97 | path[i] = ~~(path[i] * rnd) / rnd; //round values to avoid odd strings for super tiny values 98 | } 99 | path[2] = "C" + path[2]; 100 | return createCustomEase(id, "M" + path.join(",")); 101 | } 102 | }; 103 | 104 | export class CustomWiggle { 105 | 106 | constructor(id, vars) { 107 | this.ease = _create(id, vars); 108 | } 109 | 110 | static create(id, vars) { 111 | return _create(id, vars); 112 | } 113 | 114 | static register(core) { 115 | gsap = core; 116 | _initCore(); 117 | } 118 | 119 | } 120 | 121 | _getGSAP() && gsap.registerPlugin(CustomWiggle); 122 | 123 | CustomWiggle.version = "3.13.0"; 124 | 125 | export { CustomWiggle as default }; -------------------------------------------------------------------------------- /src/EasePack.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * EasePack 3.13.0 3 | * https://gsap.com 4 | * 5 | * @license Copyright 2008-2025, GreenSock. All rights reserved. 6 | * Subject to the terms at https://gsap.com/standard-license 7 | * @author: Jack Doyle, jack@greensock.com 8 | */ 9 | /* eslint-disable */ 10 | 11 | let gsap, _coreInitted, _registerEase, 12 | _getGSAP = () => gsap || (typeof(window) !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap), 13 | _boolean = (value, defaultValue) => !!(typeof(value) === "undefined" ? defaultValue : value && !~((value + "").indexOf("false"))), 14 | _initCore = core => { 15 | gsap = core || _getGSAP(); 16 | if (gsap) { 17 | _registerEase = gsap.registerEase; 18 | //add weighted ease capabilities to standard eases so users can do "power2.inOut(0.8)" for example to push everything toward the "out", or (-0.8) to push it toward the "in" (0 is neutral) 19 | let eases = gsap.parseEase(), 20 | createConfig = ease => ratio => { 21 | let y = 0.5 + ratio / 2; 22 | ease.config = p => ease(2 * (1 - p) * p * y + p * p); 23 | }, 24 | p; 25 | for (p in eases) { 26 | if (!eases[p].config) { 27 | createConfig(eases[p]); 28 | } 29 | } 30 | _registerEase("slow", SlowMo); 31 | _registerEase("expoScale", ExpoScaleEase); 32 | _registerEase("rough", RoughEase); 33 | for (p in EasePack) { 34 | p !== "version" && gsap.core.globals(p, EasePack[p]); 35 | } 36 | _coreInitted = 1; 37 | } 38 | }, 39 | _createSlowMo = (linearRatio, power, yoyoMode) => { 40 | linearRatio = Math.min(1, linearRatio || 0.7); 41 | let pow = linearRatio < 1 ? ((power || power === 0) ? power : 0.7) : 0, 42 | p1 = (1 - linearRatio) / 2, 43 | p3 = p1 + linearRatio, 44 | calcEnd = _boolean(yoyoMode); 45 | return p => { 46 | let r = p + (0.5 - p) * pow; 47 | return (p < p1) ? (calcEnd ? 1 - ((p = 1 - (p / p1)) * p) : r - ((p = 1 - (p / p1)) * p * p * p * r)) : (p > p3) ? (calcEnd ? (p === 1 ? 0 : 1 - (p = (p - p3) / p1) * p) : r + ((p - r) * (p = (p - p3) / p1) * p * p * p)) : (calcEnd ? 1 : r); 48 | } 49 | }, 50 | _createExpoScale = (start, end, ease) => { 51 | let p1 = Math.log(end / start), 52 | p2 = end - start; 53 | ease && (ease = gsap.parseEase(ease)); 54 | return p => (start * Math.exp(p1 * (ease ? ease(p) : p)) - start) / p2; 55 | }, 56 | EasePoint = function(time, value, next) { 57 | this.t = time; 58 | this.v = value; 59 | if (next) { 60 | this.next = next; 61 | next.prev = this; 62 | this.c = next.v - value; 63 | this.gap = next.t - time; 64 | } 65 | }, 66 | _createRoughEase = vars => { 67 | if (typeof(vars) !== "object") { //users may pass in via a string, like "rough(30)" 68 | vars = {points: +vars || 20}; 69 | } 70 | let taper = vars.taper || "none", 71 | a = [], 72 | cnt = 0, 73 | points = (+vars.points || 20) | 0, 74 | i = points, 75 | randomize = _boolean(vars.randomize, true), 76 | clamp = _boolean(vars.clamp), 77 | template = gsap ? gsap.parseEase(vars.template) : 0, 78 | strength = (+vars.strength || 1) * 0.4, 79 | x, y, bump, invX, obj, pnt, recent; 80 | while (--i > -1) { 81 | x = randomize ? Math.random() : (1 / points) * i; 82 | y = template ? template(x) : x; 83 | if (taper === "none") { 84 | bump = strength; 85 | } else if (taper === "out") { 86 | invX = 1 - x; 87 | bump = invX * invX * strength; 88 | } else if (taper === "in") { 89 | bump = x * x * strength; 90 | } else if (x < 0.5) { //"both" (start) 91 | invX = x * 2; 92 | bump = invX * invX * 0.5 * strength; 93 | } else { //"both" (end) 94 | invX = (1 - x) * 2; 95 | bump = invX * invX * 0.5 * strength; 96 | } 97 | if (randomize) { 98 | y += (Math.random() * bump) - (bump * 0.5); 99 | } else if (i % 2) { 100 | y += bump * 0.5; 101 | } else { 102 | y -= bump * 0.5; 103 | } 104 | if (clamp) { 105 | if (y > 1) { 106 | y = 1; 107 | } else if (y < 0) { 108 | y = 0; 109 | } 110 | } 111 | a[cnt++] = {x:x, y:y}; 112 | } 113 | a.sort((a, b) => a.x - b.x); 114 | pnt = new EasePoint(1, 1, null); 115 | i = points; 116 | while (i--) { 117 | obj = a[i]; 118 | pnt = new EasePoint(obj.x, obj.y, pnt); 119 | } 120 | recent = new EasePoint(0, 0, pnt.t ? pnt : pnt.next); 121 | return p => { 122 | let pnt = recent; 123 | if (p > pnt.t) { 124 | while (pnt.next && p >= pnt.t) { 125 | pnt = pnt.next; 126 | } 127 | pnt = pnt.prev; 128 | } else { 129 | while (pnt.prev && p <= pnt.t) { 130 | pnt = pnt.prev; 131 | } 132 | } 133 | recent = pnt; 134 | return pnt.v + ((p - pnt.t) / pnt.gap) * pnt.c; 135 | }; 136 | }; 137 | 138 | export const SlowMo = _createSlowMo(0.7); 139 | SlowMo.ease = SlowMo; //for backward compatibility 140 | SlowMo.config = _createSlowMo; 141 | 142 | export const ExpoScaleEase = _createExpoScale(1, 2); 143 | ExpoScaleEase.config = _createExpoScale; 144 | 145 | export const RoughEase = _createRoughEase(); 146 | RoughEase.ease = RoughEase; //for backward compatibility 147 | RoughEase.config = _createRoughEase; 148 | 149 | export const EasePack = { 150 | SlowMo: SlowMo, 151 | RoughEase: RoughEase, 152 | ExpoScaleEase: ExpoScaleEase 153 | }; 154 | 155 | for (let p in EasePack) { 156 | EasePack[p].register = _initCore; 157 | EasePack[p].version = "3.13.0"; 158 | } 159 | 160 | _getGSAP() && gsap.registerPlugin(SlowMo); 161 | 162 | export { EasePack as default }; -------------------------------------------------------------------------------- /src/Physics2DPlugin.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Physics2DPlugin 3.13.0 3 | * https://gsap.com 4 | * 5 | * @license Copyright 2008-2025, GreenSock. All rights reserved. 6 | * Subject to the terms at https://gsap.com/standard-license 7 | * @author: Jack Doyle, jack@greensock.com 8 | */ 9 | /* eslint-disable */ 10 | 11 | let gsap, _coreInitted, _getUnit, _getStyleSaver, _reverting, 12 | _DEG2RAD = Math.PI / 180, 13 | _getGSAP = () => gsap || (typeof(window) !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap), 14 | _round = value => Math.round(value * 10000) / 10000, 15 | _bonusValidated = 1, //Physics2DPlugin 16 | _initCore = core => { 17 | gsap = core || _getGSAP(); 18 | if (!_coreInitted) { 19 | _getUnit = gsap.utils.getUnit; 20 | _getStyleSaver = gsap.core.getStyleSaver; 21 | _reverting = gsap.core.reverting || function() {}; 22 | _coreInitted = 1; 23 | } 24 | }; 25 | 26 | class PhysicsProp { 27 | 28 | constructor(target, p, velocity, acceleration, stepsPerTimeUnit) { 29 | let cache = target._gsap, 30 | curVal = cache.get(target, p); 31 | this.p = p; 32 | this.set = cache.set(target, p); //setter 33 | this.s = this.val = parseFloat(curVal); 34 | this.u = _getUnit(curVal) || 0; 35 | this.vel = velocity || 0; 36 | this.v = this.vel / stepsPerTimeUnit; 37 | if (acceleration || acceleration === 0) { 38 | this.acc = acceleration; 39 | this.a = this.acc / (stepsPerTimeUnit * stepsPerTimeUnit); 40 | } else { 41 | this.acc = this.a = 0; 42 | } 43 | } 44 | 45 | } 46 | 47 | 48 | export const Physics2DPlugin = { 49 | version:"3.13.0", 50 | name:"physics2D", 51 | register: _initCore, 52 | init(target, value, tween) { 53 | _coreInitted || _initCore(); 54 | let data = this, 55 | angle = +value.angle || 0, 56 | velocity = +value.velocity || 0, 57 | acceleration = +value.acceleration || 0, 58 | xProp = value.xProp || "x", 59 | yProp = value.yProp || "y", 60 | aAngle = (value.accelerationAngle || value.accelerationAngle === 0) ? +value.accelerationAngle : angle; 61 | data.styles = _getStyleSaver && _getStyleSaver(target, value.xProp && value.xProp !== "x" ? value.xProp + "," + value.yProp : "transform"); 62 | data.target = target; 63 | data.tween = tween; 64 | data.step = 0; 65 | data.sps = 30; //steps per second 66 | if (value.gravity) { 67 | acceleration = +value.gravity; 68 | aAngle = 90; 69 | } 70 | angle *= _DEG2RAD; 71 | aAngle *= _DEG2RAD; 72 | data.fr = 1 - (+value.friction || 0); 73 | data._props.push(xProp, yProp); 74 | 75 | data.xp = new PhysicsProp(target, xProp, Math.cos(angle) * velocity, Math.cos(aAngle) * acceleration, data.sps); 76 | data.yp = new PhysicsProp(target, yProp, Math.sin(angle) * velocity, Math.sin(aAngle) * acceleration, data.sps); 77 | data.skipX = data.skipY = 0; 78 | }, 79 | render(ratio, data) { 80 | let { xp, yp, tween, target, step, sps, fr, skipX, skipY } = data, 81 | time = tween._from ? tween._dur - tween._time : tween._time, 82 | x, y, tt, steps, remainder, i; 83 | if (tween._time || !_reverting()) { 84 | if (fr === 1) { 85 | tt = time * time * 0.5; 86 | x = xp.s + xp.vel * time + xp.acc * tt; 87 | y = yp.s + yp.vel * time + yp.acc * tt; 88 | } else { 89 | time *= sps; 90 | steps = i = (time | 0) - step; 91 | /* 92 | Note: rounding errors build up if we walk the calculations backward which we used to do like this to maximize performance: 93 | i = -i; 94 | while (i--) { 95 | xp.val -= xp.v; 96 | yp.val -= yp.v; 97 | xp.v /= fr; 98 | yp.v /= fr; 99 | xp.v -= xp.a; 100 | yp.v -= yp.a; 101 | } 102 | but now for the sake of accuracy (to ensure rewinding always goes back to EXACTLY the same spot), we force the calculations to go forward every time. So if the tween is going backward, we just start from the beginning and iterate. This is only necessary with friction. 103 | */ 104 | if (i < 0) { 105 | xp.v = xp.vel / sps; 106 | yp.v = yp.vel / sps; 107 | xp.val = xp.s; 108 | yp.val = yp.s; 109 | data.step = 0; 110 | steps = i = time | 0; 111 | } 112 | remainder = (time % 1) * fr; 113 | while (i--) { 114 | xp.v += xp.a; 115 | yp.v += yp.a; 116 | xp.v *= fr; 117 | yp.v *= fr; 118 | xp.val += xp.v; 119 | yp.val += yp.v; 120 | } 121 | x = xp.val + xp.v * remainder; 122 | y = yp.val + yp.v * remainder; 123 | data.step += steps; 124 | } 125 | skipX || xp.set(target, xp.p, _round(x) + xp.u); 126 | skipY || yp.set(target, yp.p, _round(y) + yp.u); 127 | } else { 128 | data.styles.revert(); 129 | } 130 | }, 131 | kill(property) { 132 | if (this.xp.p === property) { 133 | this.skipX = 1; 134 | } 135 | if (this.yp.p === property) { 136 | this.skipY = 1; 137 | } 138 | } 139 | }; 140 | 141 | 142 | _getGSAP() && gsap.registerPlugin(Physics2DPlugin); 143 | 144 | export { Physics2DPlugin as default }; -------------------------------------------------------------------------------- /src/PhysicsPropsPlugin.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * PhysicsPropsPlugin 3.13.0 3 | * https://gsap.com 4 | * 5 | * @license Copyright 2008-2025, GreenSock. All rights reserved. 6 | * Subject to the terms at https://gsap.com/standard-license 7 | * @author: Jack Doyle, jack@greensock.com 8 | */ 9 | /* eslint-disable */ 10 | 11 | let gsap, _coreInitted, _getUnit, _getStyleSaver, _reverting, 12 | _getGSAP = () => gsap || (typeof(window) !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap), 13 | _round = value => Math.round(value * 10000) / 10000, 14 | _bonusValidated = 1, //PhysicsPropsPlugin 15 | _initCore = core => { 16 | gsap = core || _getGSAP(); 17 | if (!_coreInitted) { 18 | _getUnit = gsap.utils.getUnit; 19 | _getStyleSaver = gsap.core.getStyleSaver; 20 | _reverting = gsap.core.reverting || function() {}; 21 | _coreInitted = 1; 22 | } 23 | }; 24 | 25 | class PhysicsProp { 26 | 27 | constructor(target, p, velocity, acceleration, friction, stepsPerTimeUnit) { 28 | let cache = target._gsap, 29 | curVal = cache.get(target, p); 30 | this.p = p; 31 | this.set = cache.set(target, p); //setter 32 | this.s = this.val = parseFloat(curVal); 33 | this.u = _getUnit(curVal) || 0; 34 | this.vel = velocity || 0; 35 | this.v = this.vel / stepsPerTimeUnit; 36 | if (acceleration || acceleration === 0) { 37 | this.acc = acceleration; 38 | this.a = this.acc / (stepsPerTimeUnit * stepsPerTimeUnit); 39 | } else { 40 | this.acc = this.a = 0; 41 | } 42 | this.fr = 1 - (friction || 0) ; 43 | } 44 | 45 | } 46 | 47 | 48 | export const PhysicsPropsPlugin = { 49 | version:"3.13.0", 50 | name:"physicsProps", 51 | register: _initCore, 52 | init(target, value, tween) { 53 | _coreInitted || _initCore(); 54 | let data = this, 55 | p; 56 | data.styles = _getStyleSaver && _getStyleSaver(target); 57 | data.target = target; 58 | data.tween = tween; 59 | data.step = 0; 60 | data.sps = 30; //steps per second 61 | data.vProps = []; 62 | for (p in value) { 63 | let { velocity, acceleration, friction } = value[p]; 64 | if (velocity || acceleration) { 65 | data.vProps.push(new PhysicsProp(target, p, velocity, acceleration, friction, data.sps)); 66 | data._props.push(p); 67 | _getStyleSaver && data.styles.save(p); 68 | friction && (data.hasFr = 1); 69 | } 70 | } 71 | }, 72 | render(ratio, data) { 73 | let { vProps, tween, target, step, hasFr, sps } = data, 74 | i = vProps.length, 75 | time = tween._from ? tween._dur - tween._time : tween._time, 76 | curProp, steps, remainder, j, tt; 77 | if (tween._time || !_reverting()) { 78 | if (hasFr) { 79 | time *= sps; 80 | steps = (time | 0) - step; 81 | /* 82 | Note: rounding errors build up if we walk the calculations backward which we used to do like this to maximize performance: 83 | while (i--) { 84 | curProp = vProps[i]; 85 | j = -steps; 86 | while (j--) { 87 | curProp.val -= curProp.v; 88 | curProp.v /= curProp.fr; 89 | curProp.v -= curProp.a; 90 | } 91 | curProp.set(target, curProp.p, _round(curProp.val + (curProp.v * remainder * curProp.fr)) + curProp.u); 92 | } 93 | but now for the sake of accuracy (to ensure rewinding always goes back to EXACTLY the same spot), we force the calculations to go forward every time. So if the tween is going backward, we just start from the beginning and iterate. This is only necessary with friction. 94 | */ 95 | if (steps < 0) { 96 | while (i--) { 97 | curProp = vProps[i]; 98 | curProp.v = curProp.vel / sps; 99 | curProp.val = curProp.s; 100 | } 101 | i = vProps.length; 102 | data.step = step = 0; 103 | steps = time | 0; 104 | } 105 | remainder = time % 1; 106 | while (i--) { 107 | curProp = vProps[i]; 108 | j = steps; 109 | while (j--) { 110 | curProp.v += curProp.a; 111 | curProp.v *= curProp.fr; 112 | curProp.val += curProp.v; 113 | } 114 | curProp.set(target, curProp.p, _round(curProp.val + (curProp.v * remainder * curProp.fr)) + curProp.u); 115 | } 116 | data.step += steps; 117 | 118 | } else { 119 | tt = time * time * 0.5; 120 | while (i--) { 121 | curProp = vProps[i]; 122 | curProp.set(target, curProp.p, _round(curProp.s + curProp.vel * time + curProp.acc * tt) + curProp.u); 123 | } 124 | } 125 | } else { 126 | data.styles.revert(); 127 | } 128 | }, 129 | kill(property) { 130 | let vProps = this.vProps, 131 | i = vProps.length; 132 | while (i--) { 133 | vProps[i].p === property && vProps.splice(i, 1); 134 | } 135 | } 136 | }; 137 | 138 | 139 | _getGSAP() && gsap.registerPlugin(PhysicsPropsPlugin); 140 | 141 | export { PhysicsPropsPlugin as default }; -------------------------------------------------------------------------------- /src/TextPlugin.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * TextPlugin 3.13.0 3 | * https://gsap.com 4 | * 5 | * @license Copyright 2008-2025, GreenSock. All rights reserved. 6 | * Subject to the terms at https://gsap.com/standard-license 7 | * @author: Jack Doyle, jack@greensock.com 8 | */ 9 | /* eslint-disable */ 10 | 11 | import { emojiSafeSplit, getText, splitInnerHTML } from "./utils/strings.js"; 12 | 13 | let gsap, _tempDiv, 14 | _getGSAP = () => gsap || (typeof(window) !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap); 15 | 16 | 17 | export const TextPlugin = { 18 | version:"3.13.0", 19 | name:"text", 20 | init(target, value, tween) { 21 | typeof(value) !== "object" && (value = {value:value}); 22 | let i = target.nodeName.toUpperCase(), 23 | data = this, 24 | { newClass, oldClass, preserveSpaces, rtl } = value, 25 | delimiter = data.delimiter = value.delimiter || "", 26 | fillChar = data.fillChar = value.fillChar || (value.padSpace ? " " : ""), 27 | short, text, original, j, condensedText, condensedOriginal, aggregate, s; 28 | data.svg = (target.getBBox && (i === "TEXT" || i === "TSPAN")); 29 | if (!("innerHTML" in target) && !data.svg) { 30 | return false; 31 | } 32 | data.target = target; 33 | if (!("value" in value)) { 34 | data.text = data.original = [""]; 35 | return; 36 | } 37 | original = splitInnerHTML(target, delimiter, false, preserveSpaces, data.svg); 38 | _tempDiv || (_tempDiv = document.createElement("div")); 39 | _tempDiv.innerHTML = value.value; 40 | text = splitInnerHTML(_tempDiv, delimiter, false, preserveSpaces, data.svg); 41 | data.from = tween._from; 42 | if ((data.from || rtl) && !(rtl && data.from)) { // right-to-left or "from()" tweens should invert things (but if it's BOTH .from() and rtl, inverting twice equals not inverting at all :) 43 | i = original; 44 | original = text; 45 | text = i; 46 | } 47 | data.hasClass = !!(newClass || oldClass); 48 | data.newClass = rtl ? oldClass : newClass; 49 | data.oldClass = rtl ? newClass : oldClass; 50 | i = original.length - text.length; 51 | short = i < 0 ? original : text; 52 | if (i < 0) { 53 | i = -i; 54 | } 55 | while (--i > -1) { 56 | short.push(fillChar); 57 | } 58 | if (value.type === "diff") { 59 | j = 0; 60 | condensedText = []; 61 | condensedOriginal = []; 62 | aggregate = ""; 63 | for (i = 0; i < text.length; i++) { 64 | s = text[i]; 65 | if (s === original[i]) { 66 | aggregate += s; 67 | } else { 68 | condensedText[j] = aggregate + s; 69 | condensedOriginal[j++] = aggregate + original[i]; 70 | aggregate = ""; 71 | } 72 | } 73 | text = condensedText; 74 | original = condensedOriginal; 75 | if (aggregate) { 76 | text.push(aggregate); 77 | original.push(aggregate); 78 | } 79 | } 80 | value.speed && tween.duration(Math.min(0.05 / value.speed * short.length, value.maxDuration || 9999)); 81 | data.rtl = rtl; 82 | data.original = original; 83 | data.text = text; 84 | data._props.push("text"); 85 | }, 86 | render(ratio, data) { 87 | if (ratio > 1) { 88 | ratio = 1; 89 | } else if (ratio < 0) { 90 | ratio = 0; 91 | } 92 | if (data.from) { 93 | ratio = 1 - ratio; 94 | } 95 | let { text, hasClass, newClass, oldClass, delimiter, target, fillChar, original, rtl } = data, 96 | l = text.length, 97 | i = ((rtl ? 1 - ratio : ratio) * l + 0.5) | 0, 98 | applyNew, applyOld, str; 99 | if (hasClass && ratio) { 100 | applyNew = (newClass && i); 101 | applyOld = (oldClass && i !== l); 102 | str = (applyNew ? "" : "") + text.slice(0, i).join(delimiter) + (applyNew ? "" : "") + (applyOld ? "" : "") + delimiter + original.slice(i).join(delimiter) + (applyOld ? "" : ""); 103 | } else { 104 | str = text.slice(0, i).join(delimiter) + delimiter + original.slice(i).join(delimiter); 105 | } 106 | if (data.svg) { //SVG text elements don't have an "innerHTML" in Microsoft browsers. 107 | target.textContent = str; 108 | } else { 109 | target.innerHTML = (fillChar === " " && ~str.indexOf(" ")) ? str.split(" ").join("  ") : str; 110 | } 111 | } 112 | }; 113 | 114 | TextPlugin.splitInnerHTML = splitInnerHTML; 115 | TextPlugin.emojiSafeSplit = emojiSafeSplit; 116 | TextPlugin.getText = getText; 117 | 118 | _getGSAP() && gsap.registerPlugin(TextPlugin); 119 | 120 | export { TextPlugin as default }; -------------------------------------------------------------------------------- /src/all.js: -------------------------------------------------------------------------------- 1 | import gsap from "./gsap-core.js"; 2 | import CSSPlugin from "./CSSPlugin.js"; 3 | const gsapWithCSS = gsap.registerPlugin(CSSPlugin) || gsap, // to protect from tree shaking 4 | TweenMaxWithCSS = gsapWithCSS.core.Tween; 5 | 6 | export { gsapWithCSS as gsap, gsapWithCSS as default, TweenMaxWithCSS as TweenMax, CSSPlugin }; 7 | 8 | export { TweenLite, TimelineMax, TimelineLite, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ, wrap, wrapYoyo, distribute, random, snap, normalize, getUnit, clamp, splitColor, toArray, mapRange, pipe, unitize, interpolate, shuffle, selector } from "./gsap-core.js"; 9 | export * from "./CustomEase.js"; 10 | export * from "./Draggable.js"; 11 | export * from "./CSSRulePlugin.js"; 12 | export * from "./EaselPlugin.js"; 13 | export * from "./EasePack.js"; 14 | export * from "./Flip.js"; 15 | export * from "./MotionPathPlugin.js"; 16 | export * from "./Observer.js"; 17 | export * from "./PixiPlugin.js"; 18 | export * from "./ScrollToPlugin.js"; 19 | export * from "./ScrollTrigger.js"; 20 | export * from "./TextPlugin.js"; 21 | 22 | export * from "./DrawSVGPlugin.js"; 23 | export * from "./Physics2DPlugin.js"; 24 | export * from "./PhysicsPropsPlugin.js"; 25 | export * from "./ScrambleTextPlugin.js"; 26 | export * from "./CustomBounce.js"; 27 | export * from "./CustomWiggle.js"; 28 | export * from "./GSDevTools.js"; 29 | export * from "./InertiaPlugin.js"; 30 | export * from "./MorphSVGPlugin.js"; 31 | export * from "./MotionPathHelper.js"; 32 | export * from "./ScrollSmoother.js"; 33 | export * from "./SplitText.js"; -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import { gsap, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ, TweenLite, TimelineLite, TimelineMax } from "./gsap-core.js"; 2 | import { CSSPlugin } from "./CSSPlugin.js"; 3 | 4 | const gsapWithCSS = gsap.registerPlugin(CSSPlugin) || gsap, // to protect from tree shaking 5 | TweenMaxWithCSS = gsapWithCSS.core.Tween; 6 | 7 | export { 8 | gsapWithCSS as gsap, 9 | gsapWithCSS as default, 10 | CSSPlugin, 11 | TweenMaxWithCSS as TweenMax, 12 | TweenLite, 13 | TimelineMax, 14 | TimelineLite, 15 | Power0, 16 | Power1, 17 | Power2, 18 | Power3, 19 | Power4, 20 | Linear, 21 | Quad, 22 | Cubic, 23 | Quart, 24 | Quint, 25 | Strong, 26 | Elastic, 27 | Back, 28 | SteppedEase, 29 | Bounce, 30 | Sine, 31 | Expo, 32 | Circ 33 | }; -------------------------------------------------------------------------------- /src/utils/VelocityTracker.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * VelocityTracker: 3.13.0 3 | * https://gsap.com 4 | * 5 | * Copyright 2008-2025, GreenSock. All rights reserved. 6 | * Subject to the terms at https://gsap.com/standard-license 7 | * @author: Jack Doyle, jack@greensock.com 8 | */ 9 | /* eslint-disable */ 10 | 11 | let gsap, _coreInitted, _toArray, _getUnit, _first, _ticker, _time1, _time2, _getCache, 12 | _getGSAP = () => gsap || typeof(window) !== "undefined" && (gsap = window.gsap), 13 | _lookup = {}, 14 | _round = value => Math.round(value * 10000) / 10000, 15 | _getID = target => _getCache(target).id, 16 | _getByTarget = target => _lookup[_getID(typeof(target) === "string" ? _toArray(target)[0] : target)], 17 | _onTick = (time) => { 18 | let pt = _first, 19 | val; 20 | //if the frame rate is too high, we won't be able to track the velocity as well, so only update the values about 20 times per second 21 | if (time - _time1 >= 0.05) { 22 | _time2 = _time1; 23 | _time1 = time; 24 | while (pt) { 25 | val = pt.g(pt.t, pt.p); 26 | if (val !== pt.v1 || time - pt.t1 > 0.2) { //use a threshold of 0.2 seconds for zeroing-out velocity. If we only use 0.05 and things update slightly slower, like some Android devices dispatch "touchmove" events sluggishly so 2 or 3 ticks of the gsap.ticker may elapse inbetween, thus it may appear like the object is not moving but it actually is but it's not updating as frequently. A threshold of 0.2 seconds seems to be a good balance. We want to update things frequently (0.05 seconds) when they're moving so that we can respond to fast motions accurately, but we want to be more resistant to go back to a zero velocity. 27 | pt.v2 = pt.v1; 28 | pt.v1 = val; 29 | pt.t2 = pt.t1; 30 | pt.t1 = time; 31 | } 32 | pt = pt._next; 33 | } 34 | } 35 | }, 36 | _types = {deg: 360, rad: Math.PI * 2}, 37 | 38 | _initCore = () => { 39 | gsap = _getGSAP(); 40 | if (gsap) { 41 | _toArray = gsap.utils.toArray; 42 | _getUnit = gsap.utils.getUnit; 43 | _getCache = gsap.core.getCache; 44 | _ticker = gsap.ticker; 45 | _coreInitted = 1; 46 | } 47 | }; 48 | 49 | class PropTracker { 50 | 51 | constructor(target, property, type, next) { 52 | this.t = target; 53 | this.p = property; 54 | this.g = target._gsap.get; 55 | this.rCap = _types[type || _getUnit(this.g(target, property))]; //rotational cap (for degrees, "deg", it's 360 and for radians, "rad", it's Math.PI * 2) 56 | this.v1 = this.v2 = 0; 57 | this.t1 = this.t2 = _ticker.time; 58 | if (next) { 59 | this._next = next; 60 | next._prev = this; 61 | } 62 | } 63 | 64 | } 65 | 66 | export class VelocityTracker { 67 | 68 | constructor(target, property) { 69 | if (!_coreInitted) { 70 | _initCore(); 71 | } 72 | this.target = _toArray(target)[0]; 73 | _lookup[_getID(this.target)] = this; 74 | this._props = {}; 75 | property && this.add(property); 76 | } 77 | 78 | static register(core) { 79 | gsap = core; 80 | _initCore(); 81 | } 82 | 83 | get(property, skipRecentTick) { 84 | let pt = this._props[property] || console.warn("Not tracking " + property + " velocity."), 85 | val, dif, rotationCap; 86 | val = parseFloat(skipRecentTick ? pt.v1 : pt.g(pt.t, pt.p)); 87 | dif = (val - parseFloat(pt.v2)); 88 | rotationCap = pt.rCap; 89 | if (rotationCap) { //rotational values need special interpretation so that if, for example, they go from 179 to -178 degrees it is interpreted as a change of 3 instead of -357. 90 | dif = dif % rotationCap; 91 | if (dif !== dif % (rotationCap / 2)) { 92 | dif = (dif < 0) ? dif + rotationCap : dif - rotationCap; 93 | } 94 | } 95 | return _round(dif / ((skipRecentTick ? pt.t1 : _ticker.time) - pt.t2)); 96 | } 97 | 98 | getAll() { 99 | let result = {}, 100 | props = this._props, 101 | p; 102 | for (p in props) { 103 | result[p] = this.get(p); 104 | } 105 | return result; 106 | } 107 | 108 | isTracking(property) { 109 | return (property in this._props); 110 | } 111 | 112 | add(property, type) { 113 | if (!(property in this._props)) { 114 | if (!_first) { 115 | _ticker.add(_onTick); 116 | _time1 = _time2 = _ticker.time; 117 | } 118 | _first = this._props[property] = new PropTracker(this.target, property, type, _first); 119 | } 120 | } 121 | 122 | remove(property) { 123 | let pt = this._props[property], 124 | prev, next; 125 | if (pt) { 126 | prev = pt._prev; 127 | next = pt._next; 128 | if (prev) { 129 | prev._next = next; 130 | } 131 | if (next) { 132 | next._prev = prev; 133 | } else if (_first === pt) { 134 | _ticker.remove(_onTick); 135 | _first = 0; 136 | } 137 | delete this._props[property]; 138 | } 139 | } 140 | 141 | kill(shallow) { 142 | for (let p in this._props) { 143 | this.remove(p); 144 | } 145 | if (!shallow) { 146 | delete _lookup[_getID(this.target)]; 147 | } 148 | } 149 | 150 | static track(targets, properties, types) { 151 | if (!_coreInitted) { 152 | _initCore(); 153 | } 154 | let result = [], 155 | targs = _toArray(targets), 156 | a = properties.split(","), 157 | t = (types || "").split(","), 158 | i = targs.length, 159 | tracker, j; 160 | while (i--) { 161 | tracker = _getByTarget(targs[i]) || new VelocityTracker(targs[i]); 162 | j = a.length; 163 | while (j--) { 164 | tracker.add(a[j], t[j] || t[0]); 165 | } 166 | result.push(tracker); 167 | } 168 | return result; 169 | } 170 | 171 | static untrack(targets, properties) { 172 | let props = (properties || "").split(","); 173 | _toArray(targets).forEach(target => { 174 | let tracker = _getByTarget(target); 175 | if (tracker) { 176 | if (!props.length) { 177 | tracker.kill(1); 178 | } else { 179 | props.forEach(p => tracker.remove(p)); 180 | } 181 | } 182 | }); 183 | } 184 | 185 | static isTracking(target, property) { 186 | let tracker = _getByTarget(target); 187 | return tracker && tracker.isTracking(property); 188 | } 189 | 190 | static getVelocity(target, property) { 191 | let tracker = _getByTarget(target); 192 | return (!tracker || !tracker.isTracking(property)) ? console.warn("Not tracking velocity of " + property) : tracker.get(property); 193 | } 194 | } 195 | 196 | VelocityTracker.getByTarget = _getByTarget; 197 | 198 | 199 | _getGSAP() && gsap.registerPlugin(VelocityTracker); 200 | 201 | export { VelocityTracker as default }; -------------------------------------------------------------------------------- /types/css-rule-plugin.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace gsap { 2 | 3 | interface TweenVars { 4 | cssRule?: object; // TODO make more specific 5 | } 6 | } 7 | 8 | declare namespace gsap.plugins { 9 | 10 | interface CSSRulePlugin extends Plugin { 11 | /** 12 | * Gets the style sheet object associated with a particular selector. 13 | * 14 | * ```js 15 | * var rule = CSSRulePlugin.getRule(".myClass::before"); 16 | * // Then do what you want with it, such as: 17 | * gsap.to(rule, { duration: 3, cssRule: { color: "#0000FF" } }); 18 | * ``` 19 | * 20 | * @param {string} selector 21 | * @returns {CSSRule} The CSSRule 22 | * @memberof CSSRulePlugin 23 | * @link https://greensock.com/docs/v3/Plugins/CSSRulePlugin 24 | */ 25 | getRule(selector: string): CSSRule; 26 | } 27 | 28 | interface CSSRulePluginClass extends CSSRulePlugin { 29 | new(): PluginScope & CSSRulePlugin; 30 | prototype: PluginScope & CSSRulePlugin; 31 | } 32 | 33 | const cssRule: CSSRulePluginClass; 34 | } 35 | 36 | declare const CSSRulePlugin: gsap.plugins.CSSRulePlugin; 37 | 38 | declare module "gsap/CSSRulePlugin" { 39 | export const CSSRulePlugin: gsap.plugins.CSSRulePlugin; 40 | export { CSSRulePlugin as default }; 41 | } 42 | 43 | declare module "gsap/src/CSSRulePlugin" { 44 | export * from "gsap/CSSRulePlugin"; 45 | export { CSSRulePlugin as default } from "gsap/CSSRulePlugin"; 46 | } 47 | 48 | declare module "gsap/dist/CSSRulePlugin" { 49 | export * from "gsap/CSSRulePlugin"; 50 | export { CSSRulePlugin as default } from "gsap/CSSRulePlugin"; 51 | } 52 | 53 | declare module "gsap/all" { 54 | export * from "gsap/CSSRulePlugin"; 55 | } 56 | 57 | declare module "gsap-trial/CSSRulePlugin" { 58 | export * from "gsap/CSSRulePlugin"; 59 | export { CSSRulePlugin as default } from "gsap/CSSRulePlugin"; 60 | } 61 | 62 | declare module "gsap-trial/src/CSSRulePlugin" { 63 | export * from "gsap/CSSRulePlugin"; 64 | export { CSSRulePlugin as default } from "gsap/CSSRulePlugin"; 65 | } 66 | 67 | declare module "gsap-trial/dist/CSSRulePlugin" { 68 | export * from "gsap/CSSRulePlugin"; 69 | export { CSSRulePlugin as default } from "gsap/CSSRulePlugin"; 70 | } 71 | 72 | declare module "gsap-trial/all" { 73 | export * from "gsap/CSSRulePlugin"; 74 | } 75 | -------------------------------------------------------------------------------- /types/custom-bounce.d.ts: -------------------------------------------------------------------------------- 1 | // TODO 2 | declare const CustomBounce: any; 3 | 4 | declare module "gsap/CustomBounce" { 5 | 6 | // TODO 7 | export const CustomBounce: any; 8 | export { CustomBounce as default }; 9 | } 10 | 11 | declare module "gsap/dist/CustomBounce" { 12 | export * from "gsap/CustomBounce"; 13 | export { CustomBounce as default } from "gsap/CustomBounce"; 14 | } 15 | 16 | declare module "gsap/src/CustomBounce" { 17 | export * from "gsap/CustomBounce"; 18 | export { CustomBounce as default } from "gsap/CustomBounce"; 19 | } 20 | 21 | declare module "gsap/all" { 22 | export * from "gsap/CustomBounce"; 23 | } 24 | 25 | declare module "gsap-trial/CustomBounce" { 26 | export * from "gsap/CustomBounce"; 27 | export { CustomBounce as default } from "gsap/CustomBounce"; 28 | } 29 | 30 | declare module "gsap-trial/dist/CustomBounce" { 31 | export * from "gsap/CustomBounce"; 32 | export { CustomBounce as default } from "gsap/CustomBounce"; 33 | } 34 | 35 | declare module "gsap-trial/src/CustomBounce" { 36 | export * from "gsap/CustomBounce"; 37 | export { CustomBounce as default } from "gsap/CustomBounce"; 38 | } 39 | 40 | declare module "gsap-trial/all" { 41 | export * from "gsap/CustomBounce"; 42 | } 43 | -------------------------------------------------------------------------------- /types/custom-ease.d.ts: -------------------------------------------------------------------------------- 1 | // TODO 2 | declare const CustomEase: any; 3 | 4 | declare module "gsap/CustomEase" { 5 | 6 | // TODO 7 | export const CustomEase: any; 8 | export { CustomEase as default }; 9 | } 10 | 11 | declare module "gsap/dist/CustomEase" { 12 | export * from "gsap/CustomEase"; 13 | export { CustomEase as default } from "gsap/CustomEase"; 14 | } 15 | 16 | declare module "gsap/src/CustomEase" { 17 | export * from "gsap/CustomEase"; 18 | export { CustomEase as default } from "gsap/CustomEase"; 19 | } 20 | 21 | declare module "gsap/all" { 22 | export * from "gsap/CustomEase"; 23 | } 24 | 25 | declare module "gsap-trial/CustomEase" { 26 | 27 | // TODO 28 | export const CustomEase: any; 29 | export { CustomEase as default }; 30 | } 31 | 32 | declare module "gsap-trial/dist/CustomEase" { 33 | export * from "gsap/CustomEase"; 34 | export { CustomEase as default } from "gsap/CustomEase"; 35 | } 36 | 37 | declare module "gsap-trial/src/CustomEase" { 38 | export * from "gsap/CustomEase"; 39 | export { CustomEase as default } from "gsap/CustomEase"; 40 | } 41 | 42 | declare module "gsap-trial/all" { 43 | export * from "gsap/CustomEase"; 44 | } 45 | -------------------------------------------------------------------------------- /types/custom-wiggle.d.ts: -------------------------------------------------------------------------------- 1 | // TODO 2 | declare const CustomWiggle: any; 3 | 4 | declare module "gsap/CustomWiggle" { 5 | 6 | // TODO 7 | export const CustomWiggle: any; 8 | export { CustomWiggle as default }; 9 | } 10 | 11 | declare module "gsap/dist/CustomWiggle" { 12 | export * from "gsap/CustomWiggle"; 13 | export { CustomWiggle as default } from "gsap/CustomWiggle"; 14 | } 15 | 16 | declare module "gsap/src/CustomWiggle" { 17 | export * from "gsap/CustomWiggle"; 18 | export { CustomWiggle as default } from "gsap/CustomWiggle"; 19 | } 20 | 21 | declare module "gsap/all" { 22 | export * from "gsap/CustomWiggle"; 23 | } 24 | 25 | declare module "gsap-trial/CustomWiggle" { 26 | export * from "gsap/CustomWiggle"; 27 | export { CustomWiggle as default } from "gsap/CustomWiggle"; 28 | } 29 | 30 | declare module "gsap-trial/dist/CustomWiggle" { 31 | export * from "gsap/CustomWiggle"; 32 | export { CustomWiggle as default } from "gsap/CustomWiggle"; 33 | } 34 | 35 | declare module "gsap-trial/src/CustomWiggle" { 36 | export * from "gsap/CustomWiggle"; 37 | export { CustomWiggle as default } from "gsap/CustomWiggle"; 38 | } 39 | 40 | declare module "gsap-trial/all" { 41 | export * from "gsap/CustomWiggle"; 42 | } 43 | -------------------------------------------------------------------------------- /types/draw-svg-plugin.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace gsap { 2 | 3 | type DrawSVGTarget = string | SVGPrimitive | SVGPathElement; 4 | 5 | interface TweenVars { 6 | drawSVG?: number | BooleanValue | DrawSVGTarget; 7 | } 8 | } 9 | 10 | declare namespace gsap.plugins { 11 | 12 | interface DrawSVGPlugin extends Plugin { 13 | 14 | /** 15 | * Get the length of an SVG element's stroke. 16 | * 17 | * ```js 18 | * DrawSVGPlugin.getLength(element); 19 | * ``` 20 | * 21 | * @param {DrawSVGTarget} element 22 | * @returns {number} The stroke length 23 | * @memberof DrawSVGPlugin 24 | * @link https://greensock.com/docs/v3/Plugins/DrawSVGPlugin/static.getLength() 25 | */ 26 | getLength(element: DrawSVGTarget): number; 27 | 28 | /** 29 | * Get the current position of the DrawSVG in array form. 30 | * 31 | * ```js 32 | * DrawSVGPlugin.getPosition(element); 33 | * ``` 34 | * 35 | * @param {DrawSVGTarget} element 36 | * @returns {number[]} The position array 37 | * @memberof DrawSVGPlugin 38 | * @link https://greensock.com/docs/v3/Plugins/DrawSVGPlugin/static.getPosition() 39 | */ 40 | getPosition(element: DrawSVGTarget): number[]; 41 | } 42 | 43 | interface DrawSVGPluginClass extends DrawSVGPlugin { 44 | new(): PluginScope & DrawSVGPlugin; 45 | prototype: PluginScope & DrawSVGPlugin; 46 | } 47 | 48 | const drawSVG: DrawSVGPluginClass; 49 | } 50 | 51 | declare const DrawSVGPlugin: gsap.plugins.DrawSVGPlugin; 52 | 53 | declare module "gsap/DrawSVGPlugin" { 54 | export const DrawSVGPlugin: gsap.plugins.DrawSVGPlugin; 55 | export { DrawSVGPlugin as default }; 56 | } 57 | 58 | declare module "gsap/src/DrawSVGPlugin" { 59 | export * from "gsap/DrawSVGPlugin"; 60 | export { DrawSVGPlugin as default } from "gsap/DrawSVGPlugin"; 61 | } 62 | 63 | declare module "gsap/dist/DrawSVGPlugin" { 64 | export * from "gsap/DrawSVGPlugin"; 65 | export { DrawSVGPlugin as default } from "gsap/DrawSVGPlugin"; 66 | } 67 | 68 | declare module "gsap/all" { 69 | export * from "gsap/DrawSVGPlugin"; 70 | } 71 | 72 | declare module "gsap-trial/DrawSVGPlugin" { 73 | export * from "gsap/DrawSVGPlugin"; 74 | export { DrawSVGPlugin as default } from "gsap/DrawSVGPlugin"; 75 | } 76 | 77 | declare module "gsap-trial/src/DrawSVGPlugin" { 78 | export * from "gsap/DrawSVGPlugin"; 79 | export { DrawSVGPlugin as default } from "gsap/DrawSVGPlugin"; 80 | } 81 | 82 | declare module "gsap-trial/dist/DrawSVGPlugin" { 83 | export * from "gsap/DrawSVGPlugin"; 84 | export { DrawSVGPlugin as default } from "gsap/DrawSVGPlugin"; 85 | } 86 | 87 | declare module "gsap-trial/all" { 88 | export * from "gsap/DrawSVGPlugin"; 89 | } 90 | -------------------------------------------------------------------------------- /types/ease.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace gsap { 2 | 3 | interface EaseFunction { 4 | (progress: number): number; 5 | } 6 | 7 | interface Ease { 8 | easeIn: EaseFunction; 9 | easeOut: EaseFunction; 10 | easeInOut: EaseFunction; 11 | } 12 | 13 | interface BackConfig extends EaseFunction { 14 | config(overshoot: number): EaseFunction; 15 | } 16 | 17 | interface Back { 18 | easeIn: BackConfig; 19 | easeOut: BackConfig; 20 | easeInOut: BackConfig; 21 | } 22 | 23 | interface EasePack { 24 | SlowMo: gsap.SlowMo; 25 | ExpoScaleEase: gsap.ExpoScaleEase; 26 | RoughEase: gsap.RoughEase; 27 | } 28 | 29 | interface ElasticConfig extends EaseFunction { 30 | config(amplitude: number, period?: number): EaseFunction; 31 | } 32 | 33 | interface Elastic { 34 | easeIn: ElasticConfig; 35 | easeOut: ElasticConfig; 36 | easeInOut: ElasticConfig; 37 | } 38 | 39 | interface ExpoScaleEase { 40 | config(startingScale: number, endingScale: number, ease?: string | EaseFunction): EaseFunction; 41 | } 42 | 43 | interface Linear extends Ease { 44 | easeNone: EaseFunction; 45 | } 46 | 47 | interface RoughEaseVars { 48 | clamp?: boolean; 49 | points?: number; 50 | randomize?: boolean; 51 | strength?: number; 52 | taper?: "in" | "out" | "both" | "none"; 53 | template?: string | EaseFunction 54 | } 55 | 56 | interface RoughEaseEase extends EaseFunction { 57 | config: RoughEaseConfig; 58 | } 59 | 60 | interface RoughEaseConfig extends EaseFunction { 61 | (config?: RoughEaseVars): EaseFunction; 62 | } 63 | 64 | interface RoughEase extends EaseFunction { 65 | config: RoughEaseConfig; 66 | ease: RoughEaseEase; 67 | } 68 | 69 | interface SlowMoEase extends EaseFunction { 70 | config: SlowMoConfig; 71 | } 72 | 73 | interface SlowMoConfig extends EaseFunction { 74 | (linearRatio: number, power?: number, yoyoMode?: boolean): EaseFunction; 75 | } 76 | 77 | interface SlowMo extends EaseFunction { 78 | config: SlowMoConfig; 79 | ease: SlowMoEase; 80 | } 81 | 82 | interface SteppedEase { 83 | config(steps: number): EaseFunction; 84 | } 85 | } 86 | 87 | declare const Back: gsap.Back; 88 | declare const Bounce: gsap.Ease; 89 | declare const Circ: gsap.Ease; 90 | declare const Cubic: gsap.Ease; 91 | declare const Elastic: gsap.Elastic; 92 | declare const Expo: gsap.Ease; 93 | declare const Linear: gsap.Linear; 94 | declare const Power0: gsap.Linear; 95 | declare const Power1: gsap.Ease; 96 | declare const Power2: gsap.Ease; 97 | declare const Power3: gsap.Ease; 98 | declare const Power4: gsap.Ease; 99 | declare const Quad: gsap.Ease; 100 | declare const Quart: gsap.Ease; 101 | declare const Quint: gsap.Ease; 102 | declare const Sine: gsap.Ease; 103 | declare const SteppedEase: gsap.SteppedEase; 104 | declare const Strong: gsap.Ease; 105 | 106 | declare const EasePack: gsap.EasePack; 107 | declare const ExpoScaleEase: gsap.ExpoScaleEase; 108 | declare const RoughEase: gsap.RoughEase; 109 | declare const SlowMo: gsap.SlowMo; 110 | 111 | declare module "gsap/gsap-core" { 112 | export const Back: gsap.Back; 113 | export const Bounce: gsap.Ease; 114 | export const Circ: gsap.Ease; 115 | export const Cubic: gsap.Ease; 116 | export const Elastic: gsap.Elastic; 117 | export const Expo: gsap.Ease; 118 | export const Linear: gsap.Linear; 119 | export const Power0: gsap.Linear; 120 | export const Power1: gsap.Ease; 121 | export const Power2: gsap.Ease; 122 | export const Power3: gsap.Ease; 123 | export const Power4: gsap.Ease; 124 | export const Quad: gsap.Ease; 125 | export const Quart: gsap.Ease; 126 | export const Quint: gsap.Ease; 127 | export const Sine: gsap.Ease; 128 | export const SteppedEase: gsap.SteppedEase; 129 | export const Strong: gsap.Ease; 130 | } 131 | 132 | declare module "gsap/EasePack" { 133 | export const EasePack: gsap.EasePack; 134 | export const ExpoScaleEase: gsap.ExpoScaleEase; 135 | export const SlowMo: gsap.SlowMo; 136 | export const RoughEase: gsap.RoughEase; 137 | export { EasePack as default }; 138 | } 139 | 140 | declare module "gsap/src/EasePack" { 141 | export * from "gsap/EasePack"; 142 | export { EasePack as default } from "gsap/EasePack"; 143 | } 144 | 145 | declare module "gsap/dist/EasePack" { 146 | export * from "gsap/EasePack"; 147 | export { EasePack as default } from "gsap/EasePack"; 148 | } 149 | 150 | declare module "gsap/all" { 151 | export * from "gsap/EasePack"; 152 | } 153 | 154 | declare module "gsap-trial/EasePack" { 155 | export * from "gsap/EasePack"; 156 | export { EasePack as default } from "gsap/EasePack"; 157 | } 158 | 159 | declare module "gsap-trial/src/EasePack" { 160 | export * from "gsap/EasePack"; 161 | export { EasePack as default } from "gsap/EasePack"; 162 | } 163 | 164 | declare module "gsap-trial/dist/EasePack" { 165 | export * from "gsap/EasePack"; 166 | export { EasePack as default } from "gsap/EasePack"; 167 | } 168 | 169 | declare module "gsap-trial/all" { 170 | export * from "gsap/EasePack"; 171 | } 172 | -------------------------------------------------------------------------------- /types/easel-plugin.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace EaselPlugin { 2 | interface Vars { 3 | [key: string]: any; 4 | } 5 | } 6 | 7 | declare namespace gsap { 8 | 9 | interface TweenVars { 10 | easel?: EaselPlugin.Vars; 11 | } 12 | } 13 | 14 | declare namespace gsap.plugins { 15 | 16 | interface EaselPlugin extends Plugin { 17 | 18 | } 19 | 20 | interface EaselPluginClass extends EaselPlugin { 21 | new(): PluginScope & EaselPlugin; 22 | prototype: PluginScope & EaselPlugin; 23 | } 24 | 25 | const easel: EaselPluginClass; 26 | } 27 | 28 | declare const EaselPlugin: gsap.plugins.EaselPlugin; 29 | 30 | declare module "gsap/EaselPlugin" { 31 | export const EaselPlugin: gsap.plugins.EaselPlugin; 32 | export { EaselPlugin as default }; 33 | } 34 | 35 | declare module "gsap/src/EaselPlugin" { 36 | export * from "gsap/EaselPlugin"; 37 | export { EaselPlugin as default } from "gsap/EaselPlugin"; 38 | } 39 | 40 | declare module "gsap/dist/EaselPlugin" { 41 | export * from "gsap/EaselPlugin"; 42 | export { EaselPlugin as default } from "gsap/EaselPlugin"; 43 | } 44 | 45 | declare module "gsap/all" { 46 | export * from "gsap/EaselPlugin"; 47 | } 48 | 49 | declare module "gsap-trial/EaselPlugin" { 50 | export * from "gsap/EaselPlugin"; 51 | export { EaselPlugin as default } from "gsap/EaselPlugin"; 52 | } 53 | 54 | declare module "gsap-trial/src/EaselPlugin" { 55 | export * from "gsap/EaselPlugin"; 56 | export { EaselPlugin as default } from "gsap/EaselPlugin"; 57 | } 58 | 59 | declare module "gsap-trial/dist/EaselPlugin" { 60 | export * from "gsap/EaselPlugin"; 61 | export { EaselPlugin as default } from "gsap/EaselPlugin"; 62 | } 63 | 64 | declare module "gsap-trial/all" { 65 | export * from "gsap/EaselPlugin"; 66 | } 67 | -------------------------------------------------------------------------------- /types/gs-dev-tools.d.ts: -------------------------------------------------------------------------------- 1 | declare class GSDevTools { 2 | 3 | constructor(target: gsap.DOMTarget, vars?: GSDevTools.Vars); 4 | 5 | /** 6 | * Create a GSDevTools instance. 7 | * 8 | * ```js 9 | * GSDevTools.create({animation: tl}); 10 | * ``` 11 | * 12 | * @param {GSDevTools.Vars} vars 13 | * @returns {GSDevTools} The GSDevTools instance 14 | * @memberof GSDevTools 15 | * @link https://greensock.com/docs/v3/Plugins/GSDevTools/static.create() 16 | */ 17 | static create(vars?: GSDevTools.Vars): GSDevTools; 18 | 19 | /** 20 | * Returns the GSDevTools instance associated with the provided id. 21 | * 22 | * ```js 23 | * GSDevTools.getById("my-id"); 24 | * ``` 25 | * 26 | * @param {string} id 27 | * @returns {GSDevTools} The GSDevTools instance 28 | * @memberof GSDevTools 29 | * @link https://greensock.com/docs/v3/Plugins/GSDevTools/static.getById() 30 | */ 31 | static getById(id: string): GSDevTools | null; 32 | 33 | /** 34 | * Kills a GSDevTools instance 35 | * 36 | * ```js 37 | * tool.kill(); 38 | * ``` 39 | * 40 | * @memberof GSDevTools 41 | * @link https://greensock.com/docs/v3/Plugins/GSDevTools/kill() 42 | */ 43 | kill(): void 44 | } 45 | 46 | declare namespace GSDevTools { 47 | interface Vars { 48 | [key: string]: any; 49 | animation?: string | gsap.core.Animation; 50 | container?: string | Element; 51 | css?: object | string; 52 | globalSync?: boolean; 53 | hideGlobalTimeline?: boolean; 54 | id?: string; 55 | inTime?: number | string; 56 | keyboard?: boolean; 57 | loop?: boolean; 58 | minimal?: boolean; 59 | outTime?: number | string; 60 | paused?: boolean; 61 | persist?: boolean; 62 | timeScale?: number; 63 | visibility?: string; 64 | } 65 | } 66 | 67 | declare module "gsap/GSDevTools" { 68 | class _GSDevTools extends GSDevTools {} 69 | export { 70 | _GSDevTools as GSDevTools, 71 | _GSDevTools as default 72 | } 73 | } 74 | 75 | declare module "gsap/src/GSDevTools" { 76 | export * from "gsap/GSDevTools"; 77 | export { GSDevTools as default } from "gsap/GSDevTools"; 78 | } 79 | 80 | declare module "gsap/dist/GSDevTools" { 81 | export * from "gsap/GSDevTools"; 82 | export { GSDevTools as default } from "gsap/GSDevTools"; 83 | } 84 | 85 | declare module "gsap/all" { 86 | export * from "gsap/GSDevTools"; 87 | } 88 | 89 | declare module "gsap-trial/GSDevTools" { 90 | export * from "gsap/GSDevTools"; 91 | export { GSDevTools as default } from "gsap/GSDevTools"; 92 | } 93 | 94 | declare module "gsap-trial/src/GSDevTools" { 95 | export * from "gsap/GSDevTools"; 96 | export { GSDevTools as default } from "gsap/GSDevTools"; 97 | } 98 | 99 | declare module "gsap-trial/dist/GSDevTools" { 100 | export * from "gsap/GSDevTools"; 101 | export { GSDevTools as default } from "gsap/GSDevTools"; 102 | } 103 | 104 | declare module "gsap-trial/all" { 105 | export * from "gsap/GSDevTools"; 106 | } 107 | -------------------------------------------------------------------------------- /types/gsap-plugins.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace gsap { 2 | 3 | type PluginInit = ( 4 | this: PluginScope, 5 | target: object, 6 | endValue: any, 7 | tween: core.Tween, 8 | index: number, 9 | targets: object[] 10 | ) => void; 11 | 12 | type PluginRender = (this: PropTween, progress: number, data: PluginScope) => void; 13 | type PluginKill = (this: PluginScope) => void; 14 | 15 | interface PluginAliases { 16 | [key: string]: string; 17 | } 18 | 19 | // TODO: Incomplete 20 | interface PropTween { 21 | _next: PropTween; 22 | _prev: PropTween; 23 | d: PluginScope; 24 | r: PluginRender; 25 | t: object; 26 | modifier(...args: any[]): any; // TODO: Add signature 27 | } 28 | 29 | interface PluginScope { 30 | [key: string]: any; 31 | _props: string[]; 32 | _pt: PropTween; 33 | add(...args: any[]): PropTween; // TODO: Add signature 34 | name: string; 35 | init: PluginInit; 36 | kill: PluginKill; 37 | render: PluginRender; 38 | } 39 | 40 | interface PluginStatic { 41 | [key: string]: any; 42 | targetTest(...args: any[]): any; // TODO: Add signature 43 | get(target: object, prop: string): any; // TODO: Add signature 44 | getSetter(...args: any[]): any; // TODO: Add signature 45 | aliases: PluginAliases; 46 | register(core: typeof gsap): void; 47 | } 48 | 49 | interface Plugin extends Partial { 50 | name: string; 51 | init: PluginInit; 52 | kill?: PluginKill; 53 | render?: PluginRender; 54 | } 55 | 56 | interface AttrVars { 57 | [key: string]: ArrayValue | TweenValue; 58 | } 59 | 60 | interface ModifiersVars { 61 | [key: string]: (value: any, target: any) => any; 62 | } 63 | 64 | interface SnapVars { 65 | [key: string]: number | number[] | { values: number[], radius?: number }; 66 | } 67 | 68 | interface TweenVars { 69 | attr?: AttrVars; 70 | modifiers?: ModifiersVars; 71 | snap?: string | SnapVars; 72 | } 73 | } 74 | 75 | declare namespace gsap.plugins { 76 | 77 | interface AttrPlugin extends Plugin {} 78 | interface ModifiersPlugin extends Plugin {} 79 | interface SnapPlugin extends Plugin {} 80 | 81 | interface AttrPluginClass extends AttrPlugin { 82 | new(): PluginScope & AttrPlugin; 83 | prototype: PluginScope & AttrPlugin; 84 | } 85 | 86 | interface ModifiersPluginClass extends ModifiersPlugin { 87 | new(): PluginScope & ModifiersPlugin; 88 | prototype: PluginScope & ModifiersPlugin; 89 | } 90 | 91 | interface SnapPluginClass extends SnapPlugin { 92 | new(): PluginScope & SnapPlugin; 93 | prototype: PluginScope & SnapPlugin; 94 | } 95 | 96 | const attr: AttrPluginClass; 97 | const modifiers: ModifiersPluginClass; 98 | const snap: SnapPluginClass; 99 | 100 | // Data types shared between plugins 101 | type RawPath = number[][]; 102 | type Matrix2D = { a: number, b: number, c: number, d: number, e: number, f: number}; 103 | } 104 | 105 | declare const AttrPlugin: gsap.plugins.AttrPlugin; 106 | declare const ModifiersPlugin: gsap.plugins.ModifiersPlugin; 107 | declare const SnapPlugin: gsap.plugins.SnapPlugin; 108 | -------------------------------------------------------------------------------- /types/index.d.ts: -------------------------------------------------------------------------------- 1 | // Type definitions for gsap 3 2 | // Project: https://gsap.com/ 3 | // Definitions by: Jack Doyle 4 | // Blake Bowen 5 | // Pedro Tavares 6 | // Zach Saucier 7 | // Definitions: https://github.com/greensock/GSAP 8 | 9 | /// 10 | /// 11 | /// 12 | /// 13 | /// 14 | /// 15 | /// 16 | /// 17 | /// 18 | /// 19 | /// 20 | /// 21 | /// 22 | /// 23 | /// 24 | /// 25 | /// 26 | /// 27 | /// 28 | /// 29 | /// 30 | /// 31 | /// 32 | /// 33 | /// 34 | /// 35 | /// 36 | /// 37 | /// 38 | /// 39 | /// 40 | /// 41 | 42 | // Global types 43 | type GSAPDraggableVars = Draggable.Vars; 44 | type GSAPAnimation = gsap.core.Animation; 45 | type GSAPCallback = gsap.Callback; 46 | type GSAPDistributeConfig = gsap.utils.DistributeConfig; 47 | type GSAPPlugin = gsap.Plugin; 48 | type GSAPPluginScope = gsap.PluginScope; 49 | type GSAPPluginStatic = gsap.PluginStatic; 50 | type GSAPStaggerVars = gsap.StaggerVars; 51 | type GSAPTickerCallback = gsap.TickerCallback; 52 | type GSAPTimeline = gsap.core.Timeline; 53 | type GSAPTimelineVars = gsap.TimelineVars; 54 | type GSAPTween = gsap.core.Tween; 55 | type GSAPTweenTarget = gsap.TweenTarget; 56 | type GSAPTweenVars = gsap.TweenVars; 57 | 58 | type GSAP = typeof gsap; 59 | 60 | declare module "gsap" { 61 | export * from "gsap/gsap-core"; 62 | export { gsap as default } from "gsap/gsap-core"; 63 | } 64 | 65 | declare module "gsap/src" { 66 | export * from "gsap"; 67 | export { gsap as default } from "gsap"; 68 | } 69 | 70 | declare module "gsap/src/index" { 71 | export * from "gsap"; 72 | export { gsap as default } from "gsap"; 73 | } 74 | 75 | declare module "gsap/dist" { 76 | export * from "gsap"; 77 | export { gsap as default } from "gsap"; 78 | } 79 | 80 | declare module "gsap/dist/gsap" { 81 | export * from "gsap"; 82 | export { gsap as default } from "gsap"; 83 | } 84 | 85 | declare module "gsap/all" { 86 | export * from "gsap"; 87 | export { gsap as default } from "gsap"; 88 | } 89 | 90 | declare module "gsap/src/all" { 91 | export * from "gsap/all"; 92 | export { gsap as default } from "gsap/all"; 93 | } 94 | 95 | declare module "gsap-trial" { 96 | export * from "gsap/gsap-core"; 97 | export { gsap as default } from "gsap/gsap-core"; 98 | } 99 | 100 | declare module "gsap-trial/src" { 101 | export * from "gsap"; 102 | export { gsap as default } from "gsap"; 103 | } 104 | 105 | declare module "gsap-trial/src/index" { 106 | export * from "gsap"; 107 | export { gsap as default } from "gsap"; 108 | } 109 | 110 | declare module "gsap-trial/dist" { 111 | export * from "gsap"; 112 | export { gsap as default } from "gsap"; 113 | } 114 | 115 | declare module "gsap-trial/dist/gsap" { 116 | export * from "gsap"; 117 | export { gsap as default } from "gsap"; 118 | } 119 | 120 | declare module "gsap-trial/all" { 121 | export * from "gsap"; 122 | export { gsap as default } from "gsap"; 123 | } 124 | 125 | declare module "gsap-trial/src/all" { 126 | export * from "gsap/all"; 127 | export { gsap as default } from "gsap/all"; 128 | } 129 | -------------------------------------------------------------------------------- /types/inertia-plugin.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace gsap { 2 | 3 | type InertiaEndFunction = (value: T) => T; 4 | 5 | interface InertiaDuration { 6 | min?: number; 7 | max?: number; 8 | overshoot?: number; 9 | } 10 | 11 | interface InertiaLinkedProps { 12 | [key: string]: number; 13 | } 14 | 15 | interface InertiaObject { 16 | min?: number; 17 | max?: number; 18 | end?: number | number[] | InertiaEndFunction; 19 | // end?: number | number[] | InertiaEndFunction | InertiaEndFunction; 20 | velocity?: number | "auto"; 21 | } 22 | 23 | type InertiaVars = { 24 | duration?: number | InertiaDuration, 25 | linkedProps?: string, 26 | resistance?: number 27 | } & { 28 | [key: string]: TweenValue | InertiaObject 29 | }; 30 | 31 | interface TweenVars { 32 | inertia?: InertiaVars; 33 | } 34 | } 35 | 36 | declare namespace gsap.plugins { 37 | 38 | interface InertiaPlugin extends Plugin, VelocityTrackerStatic { 39 | // TODO add missing methods 40 | // TODO improve docs on site as well 41 | 42 | /** 43 | * Returns the current velocity of the given property and target object (only works if you started tracking the property using the InertiaPlugin.track() method). 44 | * 45 | * ```js 46 | * InertiaPlugin.getVelocity(obj, "x,y"); 47 | * ``` 48 | * 49 | * @param {Element} target 50 | * @param {string} props 51 | * @returns {number} The current velocity 52 | * @memberof InertiaPlugin 53 | * @link https://greensock.com/docs/v3/Plugins/InertiaPlugin/static.getVelocity() 54 | */ 55 | getVelocity(target: Element, props: string): number; 56 | } 57 | 58 | interface InertiaPluginClass extends InertiaPlugin { 59 | new(): PluginScope & InertiaPlugin; 60 | prototype: PluginScope & InertiaPlugin; 61 | } 62 | 63 | const inertia: InertiaPluginClass; 64 | } 65 | 66 | declare const InertiaPlugin: gsap.plugins.InertiaPlugin; 67 | 68 | declare module "gsap/InertiaPlugin" { 69 | export * from "gsap/utils/VelocityTracker"; 70 | export const InertiaPlugin: gsap.plugins.InertiaPlugin; 71 | export { InertiaPlugin as default }; 72 | } 73 | 74 | declare module "gsap/dist/InertiaPlugin" { 75 | export * from "gsap/InertiaPlugin"; 76 | export { InertiaPlugin as default } from "gsap/InertiaPlugin"; 77 | } 78 | 79 | declare module "gsap/src/InertiaPlugin" { 80 | export * from "gsap/InertiaPlugin"; 81 | export { InertiaPlugin as default } from "gsap/InertiaPlugin"; 82 | } 83 | 84 | declare module "gsap/all" { 85 | export * from "gsap/InertiaPlugin"; 86 | } 87 | 88 | declare module "gsap-trial/InertiaPlugin" { 89 | export * from "gsap/InertiaPlugin"; 90 | export { InertiaPlugin as default } from "gsap/InertiaPlugin"; 91 | } 92 | 93 | declare module "gsap-trial/dist/InertiaPlugin" { 94 | export * from "gsap/InertiaPlugin"; 95 | export { InertiaPlugin as default } from "gsap/InertiaPlugin"; 96 | } 97 | 98 | declare module "gsap-trial/src/InertiaPlugin" { 99 | export * from "gsap/InertiaPlugin"; 100 | export { InertiaPlugin as default } from "gsap/InertiaPlugin"; 101 | } 102 | 103 | declare module "gsap-trial/all" { 104 | export * from "gsap/InertiaPlugin"; 105 | } 106 | -------------------------------------------------------------------------------- /types/morph-svg-plugin.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace gsap { 2 | 3 | interface TweenVars { 4 | morphSVG?: SVGPathValue | gsap.plugins.MorphSVGVars; 5 | } 6 | } 7 | 8 | declare namespace gsap.plugins { 9 | 10 | interface MorphSVGPlugin extends Plugin { 11 | 12 | defaultRender?: Function; 13 | defaultType?: String; 14 | defaultUpdateTarget?: Boolean; 15 | 16 | /** 17 | * Converts SVG shapes into s. 18 | * 19 | * ```js 20 | * MorphSVGPlugin.convertToPath("circle"); 21 | * ``` 22 | * 23 | * @param {DOMTarget} shape 24 | * @param {boolean} [swap] 25 | * @returns {SVGPathElement[]} The converted paths 26 | * @memberof MorphSVGPlugin 27 | * @link https://greensock.com/docs/v3/Plugins/MorphSVGPlugin/static.convertToPath() 28 | */ 29 | convertToPath(shape: string | SVGPrimitive | (string | SVGPrimitive)[], swap?: boolean): SVGPathElement[]; 30 | 31 | /** 32 | * Returns a RawPath associated with whatever is passed in (path data string, selector text, element, or a RawPath) 33 | * 34 | * ```js 35 | * MorphSVGPlugin.getRawPath("#my-path"); 36 | * ``` 37 | * 38 | * @param {SVGPathValue} path 39 | * @returns {array} The RawPath 40 | * @memberof MorphSVGPlugin 41 | * @link https://greensock.com/docs/v3/Plugins/MorphSVGPlugin/static.getRawPath() 42 | */ 43 | getRawPath(path: SVGPathValue): string[]; 44 | 45 | /** 46 | * Accepts two strings representing SVG path data and matches the number of points between them, returning an Array with the edited path data strings [shape1, shape2]. 47 | * 48 | * ```js 49 | * MorphSVGPlugin.normalizeStrings(shape1, shape2, {map: "complexity"}); 50 | * ``` 51 | * 52 | * @param {string} shape1 53 | * @param {string} shape2 54 | * @param {NormalizeVars} config 55 | * @returns {string[]} An Array containing the converted string data with matching numbers of points, like [shape1, shape2] 56 | * @memberof MorphSVGPlugin 57 | * @link https://greensock.com/docs/v3/Plugins/MorphSVGPlugin/static.normalizeStrings() 58 | */ 59 | normalizeStrings(shape1: string, shape2: string, config?: NormalizeVars): string[]; 60 | 61 | /** 62 | * Converts a RawPath into a string of path data. 63 | * 64 | * ```js 65 | * MorphSVGPlugin.rawPathToString(myRawPath); 66 | * ``` 67 | * 68 | * @param {RawPath} rawPath 69 | * @returns {string} The converted path data 70 | * @memberof MorphSVGPlugin 71 | * @link https://greensock.com/docs/v3/Plugins/MorphSVGPlugin/static.rawPathToString() 72 | */ 73 | rawPathToString(rawPath: RawPath): string; 74 | 75 | /** 76 | * Converts a string of path data into a RawPath. 77 | * 78 | * ```js 79 | * MorphSVGPlugin.stringToRawPath("M0,0 C100,20 300,50 400,0..."); 80 | * ``` 81 | * 82 | * @param {string} data 83 | * @returns {RawPath} The converted RawPath 84 | * @memberof MorphSVGPlugin 85 | * @link https://greensock.com/docs/v3/Plugins/MorphSVGPlugin/static.stringToRawPath() 86 | */ 87 | stringToRawPath(data: string): RawPath; 88 | } 89 | 90 | interface NormalizeVars { 91 | shapeIndex?: number | "auto" | number[]; 92 | map?: "complexity" | "position" | "size"; 93 | } 94 | 95 | interface MorphSVGPluginClass extends MorphSVGPlugin { 96 | new(): PluginScope & MorphSVGPlugin; 97 | prototype: PluginScope & MorphSVGPlugin; 98 | } 99 | 100 | interface MorphSVGVars { 101 | shape: SVGPathValue; 102 | type?: "rotational" | "linear"; 103 | origin?: string; 104 | shapeIndex?: number | "auto" | number[]; 105 | precompile?: "log" | string[]; 106 | map?: "size" | "position" | "complexity"; 107 | render?: Function; 108 | updateTarget?: boolean; 109 | } 110 | 111 | const morphSVG: MorphSVGPluginClass; 112 | } 113 | 114 | declare const MorphSVGPlugin: gsap.plugins.MorphSVGPlugin; 115 | 116 | declare module "gsap/MorphSVGPlugin" { 117 | export const MorphSVGPlugin: gsap.plugins.MorphSVGPlugin; 118 | export { MorphSVGPlugin as default }; 119 | } 120 | 121 | declare module "gsap/dist/MorphSVGPlugin" { 122 | export * from "gsap/MorphSVGPlugin"; 123 | export { MorphSVGPlugin as default } from "gsap/MorphSVGPlugin"; 124 | } 125 | 126 | declare module "gsap/src/MorphSVGPlugin" { 127 | export * from "gsap/MorphSVGPlugin"; 128 | export { MorphSVGPlugin as default } from "gsap/MorphSVGPlugin"; 129 | } 130 | 131 | declare module "gsap/all" { 132 | export * from "gsap/MorphSVGPlugin"; 133 | } 134 | 135 | declare module "gsap-trial/MorphSVGPlugin" { 136 | export * from "gsap/MorphSVGPlugin"; 137 | export { MorphSVGPlugin as default } from "gsap/MorphSVGPlugin"; 138 | } 139 | 140 | declare module "gsap-trial/dist/MorphSVGPlugin" { 141 | export * from "gsap/MorphSVGPlugin"; 142 | export { MorphSVGPlugin as default } from "gsap/MorphSVGPlugin"; 143 | } 144 | 145 | declare module "gsap-trial/src/MorphSVGPlugin" { 146 | export * from "gsap/MorphSVGPlugin"; 147 | export { MorphSVGPlugin as default } from "gsap/MorphSVGPlugin"; 148 | } 149 | 150 | declare module "gsap-trial/all" { 151 | export * from "gsap/MorphSVGPlugin"; 152 | } 153 | -------------------------------------------------------------------------------- /types/motion-path-helper.d.ts: -------------------------------------------------------------------------------- 1 | declare class MotionPathHelper { 2 | 3 | constructor(target: gsap.DOMTarget, vars?: MotionPathHelper.Vars); 4 | 5 | /** 6 | * Kills the MotionPathHelper instance, removing the editing elements from the DOM. 7 | * 8 | * ```js 9 | * myHelper.kill(); 10 | * ``` 11 | * 12 | * @memberof MotionPathHelper 13 | * @link https://greensock.com/docs/v3/Plugins/MotionPathHelper/kill() 14 | */ 15 | kill(): void 16 | 17 | /** 18 | * Create a MotionPathHelper instance. 19 | * 20 | * ```js 21 | * MotionPathHelper.create(".myClass"); 22 | * ``` 23 | * 24 | * @param {gsap.DOMTarget} target 25 | * @param {MotionPathHelper.Vars} [vars] 26 | * @returns {MotionPathHelper} The MotionPathHelper instance 27 | * @memberof MotionPathHelper 28 | * @link https://greensock.com/docs/v3/Plugins/MotionPathHelper 29 | */ 30 | static create(target: gsap.DOMTarget, vars?: MotionPathHelper.Vars): MotionPathHelper; 31 | 32 | /** 33 | * Makes an SVG editable in the browser. 34 | * 35 | * ```js 36 | * MotionPathHelper.editPath(".myClass", { 37 | * onPress: () => console.log("press"), 38 | * onRelease: () => console.log("release"), 39 | * onUpdate: () => console.log("update") 40 | * }); 41 | * ``` 42 | * 43 | * @param {gsap.DOMTarget} target 44 | * @param {MotionPathHelper.EditPathVars} [vars] 45 | * @returns {object} A PathEditor instance 46 | * @memberof MotionPathHelper 47 | * @link https://greensock.com/docs/v3/Plugins/MotionPathHelper/static.editPath() 48 | */ 49 | static editPath(target: gsap.DOMTarget, vars?: MotionPathHelper.EditPathVars): MotionPathHelper; 50 | } 51 | 52 | declare namespace MotionPathHelper { 53 | interface Vars { 54 | [key: string]: any; 55 | ease?: string | gsap.EaseFunction; 56 | end?: number; 57 | duration?: number; 58 | path?: gsap.DOMTarget; 59 | pathColor?: gsap.TweenValue; 60 | pathWidth?: number; 61 | pathOpacity?: number; 62 | selected?: boolean; 63 | start?: number; 64 | } 65 | 66 | interface EditPathVars { 67 | [key: string]: any; 68 | anchorSnap?: Function; 69 | callbackScope?: object; 70 | draggable?: boolean; 71 | handleSize?: number; 72 | handleSnap?: Function; 73 | onDeleteAnchor?: Function; 74 | onPress?: Function; 75 | onRelease?: Function; 76 | onUpdate?: Function; 77 | selected?: boolean; 78 | } 79 | } 80 | 81 | declare module "gsap/MotionPathHelper" { 82 | class _MotionPathHelper extends MotionPathHelper {} 83 | export { 84 | _MotionPathHelper as MotionPathHelper, 85 | _MotionPathHelper as default 86 | } 87 | } 88 | 89 | declare module "gsap/src/MotionPathHelper" { 90 | export * from "gsap/MotionPathHelper"; 91 | export { MotionPathHelper as default } from "gsap/MotionPathHelper"; 92 | } 93 | 94 | declare module "gsap/dist/MotionPathHelper" { 95 | export * from "gsap/MotionPathHelper"; 96 | export { MotionPathHelper as default } from "gsap/MotionPathHelper"; 97 | } 98 | 99 | declare module "gsap/all" { 100 | export * from "gsap/MotionPathHelper"; 101 | } 102 | 103 | declare module "gsap-trial/MotionPathHelper" { 104 | export * from "gsap/MotionPathHelper"; 105 | export { MotionPathHelper as default } from "gsap/MotionPathHelper"; 106 | } 107 | 108 | declare module "gsap-trial/src/MotionPathHelper" { 109 | export * from "gsap/MotionPathHelper"; 110 | export { MotionPathHelper as default } from "gsap/MotionPathHelper"; 111 | } 112 | 113 | declare module "gsap-trial/dist/MotionPathHelper" { 114 | export * from "gsap/MotionPathHelper"; 115 | export { MotionPathHelper as default } from "gsap/MotionPathHelper"; 116 | } 117 | 118 | declare module "gsap-trial/all" { 119 | export * from "gsap/MotionPathHelper"; 120 | } 121 | -------------------------------------------------------------------------------- /types/observer.d.ts: -------------------------------------------------------------------------------- 1 | declare class Observer { 2 | static readonly isTouch: number; 3 | static readonly eventTypes: string[]; 4 | static readonly version: string; 5 | 6 | readonly deltaX: number; 7 | readonly deltaY: number; 8 | readonly event: Event; 9 | readonly isDragging: boolean; 10 | readonly isEnabled: boolean; 11 | readonly isPressed: boolean; 12 | readonly startX?: number; 13 | readonly startY?: number; 14 | readonly target: Element; 15 | readonly vars: Observer.ObserverVars; 16 | readonly velocityX: number; 17 | readonly velocityY: number; 18 | readonly x?: number; 19 | readonly y?: number; 20 | readonly axis?: string | null; 21 | 22 | /** 23 | * Creates a new Observer 24 | * 25 | * ```js 26 | * Observer.create({ 27 | * target: "#id", 28 | * onUp: () => console.log("up"), 29 | * onDown: () => console.log("down"), 30 | * onPress: () => console.log("press") 31 | * }); 32 | * ``` 33 | * 34 | * @static 35 | * @param {Observer.ObserverVars} vars 36 | * @returns {Observer} The Observer 37 | * @memberof Observer 38 | * @link https://greensock.com/docs/v3/Plugins/Observer/static.create() 39 | */ 40 | static create(vars: Observer.ObserverVars): Observer; 41 | 42 | /** 43 | * Gets all Observers (that haven't been killed) 44 | * 45 | * ```js 46 | * Observer.getAll().forEach(o => o.kill()); 47 | * ``` 48 | * 49 | * @static 50 | * @returns {Observer[]} An Array of Observers 51 | * @memberof Observer 52 | * @link https://greensock.com/docs/v3/Plugins/Observer/static.getAll() 53 | */ 54 | static getAll(): Observer[]; 55 | 56 | /** 57 | * Gets the observer with the id provided. 58 | * 59 | * ```js 60 | * let o = Observer.getById("my-id"); 61 | * ``` 62 | * 63 | * @static 64 | * @param {string} id 65 | * @returns {Observer | undefined} The Observer with the supplied id (if one exists) 66 | * @memberof Observer 67 | * @link https://greensock.com/docs/v3/Plugins/Observer/static.getAll() 68 | */ 69 | static getById(id: string): Observer | undefined; 70 | 71 | /** 72 | * Disables a Observer instance. 73 | * 74 | * ```js 75 | * observer.disable(); 76 | * ``` 77 | */ 78 | disable(): void; 79 | 80 | /** 81 | * Re-enables a disabled Observer instance. 82 | * 83 | * ```js 84 | * observer.enable(); 85 | * ``` 86 | */ 87 | enable(): this; 88 | 89 | /** 90 | * Kills a Observer instance (same as disabling, but typically permanent). 91 | * 92 | * ```js 93 | * observer.kill(); 94 | * ``` 95 | */ 96 | kill(): void; 97 | 98 | /** 99 | * Gets the horizontal scroll position of the target (typically scrollLeft). 100 | * 101 | * ```js 102 | * observer.scrollX(); 103 | * ``` 104 | * 105 | * @returns {number} The horizontal scroll position of the target 106 | */ 107 | scrollX(): number; 108 | 109 | /** 110 | * Sets the horizontal scroll position of the target (typically scrollTop). 111 | * 112 | * ```js 113 | * observer.scrollX(100); 114 | * ``` 115 | * 116 | * @param {number} position 117 | */ 118 | scrollX(position: number): void; 119 | 120 | /** 121 | * Gets the vertical scroll position of the target (typically scrollTop). 122 | * 123 | * ```js 124 | * observer.scrollY(); 125 | * ``` 126 | * 127 | * @returns {number} The vertical scroll position of the target 128 | */ 129 | scrollY(): number; 130 | 131 | /** 132 | * Sets the vertical scroll position of the target (typically scrollTop). 133 | * 134 | * ```js 135 | * observer.scrollY(100); 136 | * ``` 137 | * 138 | * @param {number} position 139 | */ 140 | scrollY(position: number): void; 141 | 142 | } 143 | 144 | declare namespace Observer { 145 | 146 | type ObserverCallback = (self: Observer) => any; 147 | type IgnoreCheckCallback = (event: Event, isTouchOrPointer: boolean) => boolean; 148 | 149 | interface ObserverVars { 150 | allowClicks?: boolean; 151 | capture?: boolean; 152 | debounce?: boolean; 153 | dragMinimum?: number; 154 | event?: Event; 155 | id?: string; 156 | ignore?: gsap.DOMTarget; 157 | ignoreCheck?: IgnoreCheckCallback; 158 | lineHeight?: number; 159 | lockAxis?: boolean; 160 | onLockAxis?: ObserverCallback; 161 | onDown?: ObserverCallback; 162 | onUp?: ObserverCallback; 163 | onLeft?: ObserverCallback; 164 | onRight?: ObserverCallback; 165 | onDisable?: ObserverCallback; 166 | onDrag?: ObserverCallback; 167 | onDragStart?: ObserverCallback; 168 | onDragEnd?: ObserverCallback; 169 | onEnable?: ObserverCallback; 170 | onHover?: ObserverCallback; 171 | onHoverEnd?: ObserverCallback; 172 | onToggleY?: ObserverCallback; 173 | onToggleX?: ObserverCallback; 174 | onChangeX?: ObserverCallback; 175 | onChangeY?: ObserverCallback; 176 | onChange?: ObserverCallback; 177 | onClick?: ObserverCallback; 178 | onPress?: ObserverCallback; 179 | onRelease?: ObserverCallback; 180 | onMove?: ObserverCallback; 181 | onWheel?: ObserverCallback; 182 | onStop?: ObserverCallback; 183 | onStopDelay?: number; 184 | preventDefault?: boolean; 185 | target?: gsap.DOMTarget | Window | Document; 186 | tolerance?: number; 187 | type?: string; 188 | wheelSpeed?: number; 189 | } 190 | } 191 | 192 | declare module "gsap/Observer" { 193 | class _Observer extends Observer { } 194 | export { 195 | _Observer as Observer, 196 | _Observer as default 197 | } 198 | } 199 | 200 | declare module "gsap/dist/Observer" { 201 | export * from "gsap/Observer"; 202 | export { Observer as default } from "gsap/Observer"; 203 | } 204 | 205 | declare module "gsap/src/Observer" { 206 | export * from "gsap/Observer"; 207 | export { Observer as default } from "gsap/Observer"; 208 | } 209 | 210 | declare module "gsap/all" { 211 | export * from "gsap/Observer"; 212 | } 213 | 214 | declare module "gsap-trial/Observer" { 215 | export * from "gsap/Observer"; 216 | export { Observer as default } from "gsap/Observer"; 217 | } 218 | 219 | declare module "gsap-trial/dist/Observer" { 220 | export * from "gsap/Observer"; 221 | export { Observer as default } from "gsap/Observer"; 222 | } 223 | 224 | declare module "gsap-trial/src/Observer" { 225 | export * from "gsap/Observer"; 226 | export { Observer as default } from "gsap/Observer"; 227 | } 228 | 229 | declare module "gsap-trial/all" { 230 | export * from "gsap/Observer"; 231 | } 232 | -------------------------------------------------------------------------------- /types/physics-2d-plugin.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace Physics2DPlugin { 2 | interface Vars { 3 | acceleration?: gsap.TweenValue; 4 | accelerationAngle?: gsap.TweenValue; 5 | angle?: gsap.TweenValue; 6 | friction?: gsap.TweenValue; 7 | gravity?: gsap.TweenValue; 8 | velocity?: gsap.TweenValue; 9 | xProp?: string; 10 | yProp?: string; 11 | } 12 | } 13 | 14 | declare namespace gsap { 15 | 16 | interface TweenVars { 17 | physics2D?: Physics2DPlugin.Vars; 18 | } 19 | } 20 | 21 | declare namespace gsap.plugins { 22 | interface Physics2DPlugin extends Plugin { 23 | 24 | } 25 | 26 | interface Physics2DPluginClass extends Physics2DPlugin { 27 | new(): PluginScope & Physics2DPlugin; 28 | prototype: PluginScope & Physics2DPlugin; 29 | } 30 | 31 | const physics2D: Physics2DPluginClass; 32 | } 33 | 34 | declare const Physics2DPlugin: gsap.plugins.Physics2DPlugin; 35 | 36 | declare module "gsap/Physics2DPlugin" { 37 | export const Physics2DPlugin: gsap.plugins.Physics2DPlugin; 38 | export { Physics2DPlugin as default }; 39 | } 40 | 41 | declare module "gsap/src/Physics2DPlugin" { 42 | export * from "gsap/Physics2DPlugin"; 43 | export { Physics2DPlugin as default } from "gsap/Physics2DPlugin"; 44 | } 45 | 46 | declare module "gsap/dist/Physics2DPlugin" { 47 | export * from "gsap/Physics2DPlugin"; 48 | export { Physics2DPlugin as default } from "gsap/Physics2DPlugin"; 49 | } 50 | 51 | declare module "gsap/all" { 52 | export * from "gsap/Physics2DPlugin"; 53 | } 54 | 55 | declare module "gsap-trial/Physics2DPlugin" { 56 | export * from "gsap/Physics2DPlugin"; 57 | export { Physics2DPlugin as default } from "gsap/Physics2DPlugin"; 58 | } 59 | 60 | declare module "gsap-trial/src/Physics2DPlugin" { 61 | export * from "gsap/Physics2DPlugin"; 62 | export { Physics2DPlugin as default } from "gsap/Physics2DPlugin"; 63 | } 64 | 65 | declare module "gsap-trial/dist/Physics2DPlugin" { 66 | export * from "gsap/Physics2DPlugin"; 67 | export { Physics2DPlugin as default } from "gsap/Physics2DPlugin"; 68 | } 69 | 70 | declare module "gsap-trial/all" { 71 | export * from "gsap/Physics2DPlugin"; 72 | } 73 | -------------------------------------------------------------------------------- /types/physics-props-plugin.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace PhysicsPropsPlugin { 2 | interface Vars { 3 | [key: string]: Values; 4 | } 5 | 6 | interface Values { 7 | acceleration?: gsap.TweenValue; 8 | friction?: gsap.TweenValue; 9 | velocity?: gsap.TweenValue; 10 | } 11 | } 12 | 13 | declare namespace gsap { 14 | 15 | interface TweenVars { 16 | physicsProps?: PhysicsPropsPlugin.Vars; 17 | } 18 | } 19 | 20 | declare namespace gsap.plugins { 21 | interface PhysicsPropsPlugin extends Plugin { 22 | 23 | } 24 | 25 | interface PhysicsPropsPluginClass extends PhysicsPropsPlugin { 26 | new(): PluginScope & PhysicsPropsPlugin; 27 | prototype: PluginScope & PhysicsPropsPlugin; 28 | } 29 | 30 | const physicsProps: PhysicsPropsPluginClass; 31 | } 32 | 33 | declare const PhysicsPropsPlugin: gsap.plugins.PhysicsPropsPlugin; 34 | 35 | declare module "gsap/PhysicsPropsPlugin" { 36 | export const PhysicsPropsPlugin: gsap.plugins.PhysicsPropsPlugin; 37 | export { PhysicsPropsPlugin as default }; 38 | } 39 | 40 | declare module "gsap/src/PhysicsPropsPlugin" { 41 | export * from "gsap/PhysicsPropsPlugin"; 42 | export { PhysicsPropsPlugin as default } from "gsap/PhysicsPropsPlugin"; 43 | } 44 | 45 | declare module "gsap/dist/PhysicsPropsPlugin" { 46 | export * from "gsap/PhysicsPropsPlugin"; 47 | export { PhysicsPropsPlugin as default } from "gsap/PhysicsPropsPlugin"; 48 | } 49 | 50 | declare module "gsap/all" { 51 | export * from "gsap/PhysicsPropsPlugin"; 52 | } 53 | 54 | declare module "gsap-trial/PhysicsPropsPlugin" { 55 | export * from "gsap/PhysicsPropsPlugin"; 56 | export { PhysicsPropsPlugin as default } from "gsap/PhysicsPropsPlugin"; 57 | } 58 | 59 | declare module "gsap-trial/src/PhysicsPropsPlugin" { 60 | export * from "gsap/PhysicsPropsPlugin"; 61 | export { PhysicsPropsPlugin as default } from "gsap/PhysicsPropsPlugin"; 62 | } 63 | 64 | declare module "gsap-trial/dist/PhysicsPropsPlugin" { 65 | export * from "gsap/PhysicsPropsPlugin"; 66 | export { PhysicsPropsPlugin as default } from "gsap/PhysicsPropsPlugin"; 67 | } 68 | 69 | declare module "gsap-trial/all" { 70 | export * from "gsap/PhysicsPropsPlugin"; 71 | } 72 | -------------------------------------------------------------------------------- /types/pixi-plugin.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace PixiPlugin { 2 | interface PixiMatrix { 3 | a: number; 4 | b: number; 5 | c: number; 6 | d: number; 7 | tx: number; 8 | ty: number; 9 | array?: number[]; 10 | } 11 | 12 | interface Vars { 13 | [key: string]: any; 14 | alpha?: number | string; 15 | anchor?: number; 16 | anchorX?: number | string; 17 | anchorY?: number | string; 18 | angle?: number | string; 19 | autoAlpha?: number; 20 | blur?: number; 21 | blurX?: number; 22 | blurY?: number; 23 | blurPadding?: number; 24 | brightness?: number; 25 | colorize?: string | number; 26 | colorizeAmount?: number; 27 | colorMatrixFilter?: object; // TODO 28 | combineCMF?: boolean; 29 | contrast?: number; 30 | fillColor?: string | number; 31 | height?: number | string; 32 | hue?: number; 33 | lineColor?: string | number; 34 | matrix?: PixiMatrix; 35 | pivot?: number; 36 | pivotX?: number | string; 37 | pivotY?: number | string; 38 | position?: number | string; 39 | positionX?: number | string; 40 | positionY?: number | string; 41 | resolution?: number; 42 | rotation?: number | string; 43 | saturation?: number; 44 | scale?: number | string; 45 | scaleX?: number | string; 46 | scaleY?: number | string; 47 | skew?: number | string; 48 | skewX?: number | string; 49 | skewY?: number | string; 50 | tilePosition?: number; 51 | tilePositionX?: number | string; 52 | tilePositionY?: number | string; 53 | tileScale?: number; 54 | tileScaleX?: number | string; 55 | tileScaleY?: number | string; 56 | tileX?: number | string; 57 | tileY?: number | string; 58 | tint?: string | number; 59 | width?: number | string; 60 | x?: number | string; 61 | y?: number | string; 62 | zIndex?: number | string; 63 | } 64 | } 65 | 66 | declare namespace gsap { 67 | 68 | interface TweenVars { 69 | pixi?: PixiPlugin.Vars; 70 | } 71 | } 72 | 73 | declare namespace gsap.plugins { 74 | 75 | interface PixiPlugin extends Plugin { 76 | 77 | /** 78 | * Registers the main PIXI library object with the PixiPlugin so that it can find the 79 | * necessary classes/objects. You only need to register it once. 80 | * 81 | * ```js 82 | * PixiPlugin.registerPIXI(PIXI); 83 | * ``` 84 | * 85 | * @param {object} pixi 86 | * @memberof PixiPlugin 87 | * @link https://greensock.com/docs/v3/Plugins/PixiPlugin/static.registerPIXI() 88 | */ 89 | registerPIXI(pixi: object): void; 90 | } 91 | 92 | interface PixiPluginClass extends PixiPlugin { 93 | new(): PluginScope & PixiPlugin; 94 | prototype: PluginScope & PixiPlugin; 95 | } 96 | 97 | const pixi: PixiPluginClass; 98 | } 99 | 100 | declare const PixiPlugin: gsap.plugins.PixiPlugin; 101 | 102 | declare module "gsap/PixiPlugin" { 103 | export const PixiPlugin: gsap.plugins.PixiPlugin; 104 | export { PixiPlugin as default }; 105 | } 106 | 107 | declare module "gsap/src/PixiPlugin" { 108 | export * from "gsap/PixiPlugin"; 109 | export { PixiPlugin as default } from "gsap/PixiPlugin"; 110 | } 111 | 112 | declare module "gsap/dist/PixiPlugin" { 113 | export * from "gsap/PixiPlugin"; 114 | export { PixiPlugin as default } from "gsap/PixiPlugin"; 115 | } 116 | 117 | declare module "gsap/all" { 118 | export * from "gsap/PixiPlugin"; 119 | } 120 | 121 | declare module "gsap-trial/PixiPlugin" { 122 | export * from "gsap/PixiPlugin"; 123 | export { PixiPlugin as default } from "gsap/PixiPlugin"; 124 | } 125 | 126 | declare module "gsap-trial/src/PixiPlugin" { 127 | export * from "gsap/PixiPlugin"; 128 | export { PixiPlugin as default } from "gsap/PixiPlugin"; 129 | } 130 | 131 | declare module "gsap-trial/dist/PixiPlugin" { 132 | export * from "gsap/PixiPlugin"; 133 | export { PixiPlugin as default } from "gsap/PixiPlugin"; 134 | } 135 | 136 | declare module "gsap-trial/all" { 137 | export * from "gsap/PixiPlugin"; 138 | } 139 | -------------------------------------------------------------------------------- /types/scramble-text-plugin.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace ScrambleTextPlugin { 2 | interface Vars { 3 | text: string; 4 | chars?: string; 5 | speed?: number; 6 | delimiter?: string; 7 | tweenLength?: boolean; 8 | newClass?: string; 9 | oldClass?: string; 10 | revealDelay?: number; 11 | rightToLeft?: boolean; 12 | } 13 | } 14 | 15 | declare namespace gsap { 16 | 17 | interface TweenVars { 18 | scrambleText?: string | ScrambleTextPlugin.Vars; 19 | } 20 | } 21 | 22 | declare namespace gsap.plugins { 23 | interface ScrambleTextPlugin extends Plugin { 24 | 25 | } 26 | 27 | interface ScrambleTextPluginClass extends ScrambleTextPlugin { 28 | new(): PluginScope & ScrambleTextPlugin; 29 | prototype: PluginScope & ScrambleTextPlugin; 30 | } 31 | 32 | const scrambleText: ScrambleTextPluginClass; 33 | } 34 | 35 | declare const ScrambleTextPlugin: gsap.plugins.ScrambleTextPlugin; 36 | 37 | declare module "gsap/ScrambleTextPlugin" { 38 | export const ScrambleTextPlugin: gsap.plugins.ScrambleTextPlugin; 39 | export { ScrambleTextPlugin as default }; 40 | } 41 | 42 | declare module "gsap/src/ScrambleTextPlugin" { 43 | export * from "gsap/ScrambleTextPlugin"; 44 | export { ScrambleTextPlugin as default } from "gsap/ScrambleTextPlugin"; 45 | } 46 | 47 | declare module "gsap/dist/ScrambleTextPlugin" { 48 | export * from "gsap/ScrambleTextPlugin"; 49 | export { ScrambleTextPlugin as default } from "gsap/ScrambleTextPlugin"; 50 | } 51 | 52 | declare module "gsap/all" { 53 | export * from "gsap/ScrambleTextPlugin"; 54 | } 55 | 56 | declare module "gsap-trial/ScrambleTextPlugin" { 57 | export * from "gsap/ScrambleTextPlugin"; 58 | export { ScrambleTextPlugin as default } from "gsap/ScrambleTextPlugin"; 59 | } 60 | 61 | declare module "gsap-trial/src/ScrambleTextPlugin" { 62 | export * from "gsap/ScrambleTextPlugin"; 63 | export { ScrambleTextPlugin as default } from "gsap/ScrambleTextPlugin"; 64 | } 65 | 66 | declare module "gsap-trial/dist/ScrambleTextPlugin" { 67 | export * from "gsap/ScrambleTextPlugin"; 68 | export { ScrambleTextPlugin as default } from "gsap/ScrambleTextPlugin"; 69 | } 70 | 71 | declare module "gsap-trial/all" { 72 | export * from "gsap/ScrambleTextPlugin"; 73 | } 74 | -------------------------------------------------------------------------------- /types/scroll-to-plugin.d.ts: -------------------------------------------------------------------------------- 1 | declare class ScrollToPlugin { 2 | 3 | /** 4 | * Configure ScrollToPlugin 5 | * 6 | * ```js 7 | * ScrollToPlugin.config({ 8 | * autoKill: true 9 | * }); 10 | * ``` 11 | * 12 | * @static 13 | * @param {ScrollToPlugin.ConfigVars} vars 14 | * @memberof ScrollToPlugin 15 | * @link https://greensock.com/docs/v3/Plugins/ScrollToPlugin/static.config() 16 | */ 17 | static config(vars: ScrollToPlugin.ConfigVars): void; 18 | 19 | 20 | /** 21 | * Returns the maximum scroll value for the given Element 22 | * 23 | * ```js 24 | * ScrollToPlugin.max(window); 25 | * ``` 26 | * 27 | * @static 28 | * @param {gsap.DOMTarget} element 29 | * @returns {number} maximum scroll value in pixels 30 | * @memberof ScrollToPlugin 31 | * @link https://greensock.com/docs/v3/Plugins/ScrollToPlugin/static.max() 32 | */ 33 | static max(element: gsap.DOMTarget): number; 34 | 35 | /** 36 | * Returns the maximum scroll value for the given Element 37 | * 38 | * ```js 39 | * ScrollToPlugin.offset("#target", window); 40 | * ``` 41 | * 42 | * @static 43 | * @param {gsap.DOMTarget} element 44 | * @param {gsap.DOMTarget} container 45 | * @returns {number} offset value 46 | * @memberof ScrollToPlugin 47 | * @link https://greensock.com/docs/v3/Plugins/ScrollToPlugin/static.offset() 48 | */ 49 | static offset(element: gsap.DOMTarget, container?: gsap.DOMTarget): number; 50 | } 51 | 52 | declare namespace ScrollToPlugin { 53 | interface Vars { 54 | x?: number | string | Element; 55 | y?: number | string | Element; 56 | offsetX?: number; 57 | offsetY?: number; 58 | autoKill?: boolean; 59 | onAutoKill?: Function; 60 | } 61 | 62 | interface ConfigVars { 63 | autoKill?: boolean; 64 | autoKillThreshold?: number; 65 | } 66 | } 67 | 68 | declare namespace gsap { 69 | 70 | interface TweenVars { 71 | scrollTo?: number | string | Element | Function | ScrollToPlugin.Vars; 72 | } 73 | } 74 | 75 | declare module "gsap/ScrollToPlugin" { 76 | class _ScrollToPlugin extends ScrollToPlugin { } 77 | export { 78 | _ScrollToPlugin as ScrollToPlugin, 79 | _ScrollToPlugin as default 80 | } 81 | } 82 | 83 | declare module "gsap/src/ScrollToPlugin" { 84 | export * from "gsap/ScrollToPlugin"; 85 | export { ScrollToPlugin as default } from "gsap/ScrollToPlugin"; 86 | } 87 | 88 | declare module "gsap/dist/ScrollToPlugin" { 89 | export * from "gsap/ScrollToPlugin"; 90 | export { ScrollToPlugin as default } from "gsap/ScrollToPlugin"; 91 | } 92 | 93 | declare module "gsap/all" { 94 | export * from "gsap/ScrollToPlugin"; 95 | } 96 | 97 | declare module "gsap-trial/ScrollToPlugin" { 98 | export * from "gsap/ScrollToPlugin"; 99 | export { ScrollToPlugin as default } from "gsap/ScrollToPlugin"; 100 | } 101 | 102 | declare module "gsap-trial/src/ScrollToPlugin" { 103 | export * from "gsap/ScrollToPlugin"; 104 | export { ScrollToPlugin as default } from "gsap/ScrollToPlugin"; 105 | } 106 | 107 | declare module "gsap-trial/dist/ScrollToPlugin" { 108 | export * from "gsap/ScrollToPlugin"; 109 | export { ScrollToPlugin as default } from "gsap/ScrollToPlugin"; 110 | } 111 | 112 | declare module "gsap-trial/all" { 113 | export * from "gsap/ScrollToPlugin"; 114 | } 115 | -------------------------------------------------------------------------------- /types/split-text.d.ts: -------------------------------------------------------------------------------- 1 | declare class SplitText { 2 | readonly chars: Element[]; 3 | readonly lines: Element[]; 4 | readonly words: Element[]; 5 | readonly masks: Element[]; 6 | readonly elements: Element[]; 7 | readonly isSplit: boolean; 8 | 9 | constructor(target: gsap.DOMTarget, vars?: SplitText.Vars); 10 | 11 | 12 | /** 13 | * Reverts the innerHTML to the original content. 14 | * 15 | * ```js 16 | * split.revert(); 17 | * ``` 18 | * 19 | * @memberof SplitText 20 | * @link https://greensock.com/docs/v3/Plugins/SplitText/revert() 21 | */ 22 | revert(): void; 23 | 24 | /** 25 | * Re-splits a SplitText according to the vars provided. It will automatically call revert() first if necessary. Useful if you want to change the way the text is split after the SplitText instance is created. 26 | * 27 | * ```js 28 | * split.split({type: "lines,chars"}); 29 | * ``` 30 | * 31 | * @param {SplitText.Vars} vars 32 | * @returns {SplitText} The SplitText object created 33 | * @memberof SplitText 34 | * @link https://greensock.com/docs/v3/Plugins/SplitText/split() 35 | */ 36 | split(vars: SplitText.Vars): SplitText; 37 | 38 | /** 39 | * Creates a SplitText instance according to the vars provided. 40 | * 41 | * ```js 42 | * SplitText.create(".split", {type: "lines,chars"}); 43 | * ``` 44 | * 45 | * @param {gsap.DOMTarget} target 46 | * @param {SplitText.Vars} vars 47 | * @returns {SplitText} The SplitText object created 48 | * @memberof SplitText 49 | * @link https://greensock.com/docs/v3/Plugins/SplitText/static.create() 50 | */ 51 | static create(target: gsap.DOMTarget, vars?: SplitText.Vars): SplitText; 52 | 53 | } 54 | 55 | declare namespace SplitText { 56 | 57 | type SplitTextTarget = string | NodeList | Node | Node[]; 58 | type PrepareTextFunction = (text: string, element: Element) => string; 59 | interface WordDelimiterConfig { 60 | delimiter: RegExp | string; 61 | replaceWith?: string; 62 | } 63 | interface Vars { 64 | [key: string]: any; 65 | type: string; 66 | mask?: "lines" | "words" | "chars"; 67 | wordDelimiter?: string | RegExp | WordDelimiterConfig; 68 | linesClass?: string; 69 | wordsClass?: string; 70 | charsClass?: string; 71 | aria?: "auto" | "hidden" | "none"; 72 | tag?: string; 73 | propIndex?: boolean; 74 | deepSlice?: boolean; 75 | smartWrap?: boolean; 76 | specialChars?: string[] | RegExp; 77 | reduceWhiteSpace?: boolean; 78 | autoSplit?: boolean; 79 | ignore?: SplitTextTarget; 80 | prepareText?: PrepareTextFunction; 81 | onSplit?: (splitText: SplitText) => void; 82 | onRevert?: (splitText: SplitText) => void; 83 | } 84 | } 85 | 86 | declare module "gsap/SplitText" { 87 | class _SplitText extends SplitText {} 88 | export { 89 | _SplitText as SplitText, 90 | _SplitText as default 91 | } 92 | } 93 | 94 | declare module "gsap/src/SplitText" { 95 | export * from "gsap/SplitText"; 96 | export { SplitText as default } from "gsap/SplitText"; 97 | } 98 | 99 | declare module "gsap/dist/SplitText" { 100 | export * from "gsap/SplitText"; 101 | export { SplitText as default } from "gsap/SplitText"; 102 | } 103 | 104 | declare module "gsap/all" { 105 | export * from "gsap/SplitText"; 106 | } 107 | 108 | declare module "gsap-trial/SplitText" { 109 | export * from "gsap/SplitText"; 110 | export { SplitText as default } from "gsap/SplitText"; 111 | } 112 | 113 | declare module "gsap-trial/src/SplitText" { 114 | export * from "gsap/SplitText"; 115 | export { SplitText as default } from "gsap/SplitText"; 116 | } 117 | 118 | declare module "gsap-trial/dist/SplitText" { 119 | export * from "gsap/SplitText"; 120 | export { SplitText as default } from "gsap/SplitText"; 121 | } 122 | 123 | declare module "gsap-trial/all" { 124 | export * from "gsap/SplitText"; 125 | } 126 | -------------------------------------------------------------------------------- /types/text-plugin.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace TextPlugin { 2 | interface Vars { 3 | value: string; 4 | type?: string; 5 | rtl?: boolean; 6 | speed?: number; 7 | delimiter?: string; 8 | padSpace?: boolean; 9 | newClass?: string; 10 | oldClass?: string; 11 | preserveSpaces?: boolean; 12 | } 13 | } 14 | 15 | declare namespace gsap { 16 | 17 | interface TweenVars { 18 | text?: string | TextPlugin.Vars; 19 | } 20 | } 21 | 22 | declare namespace gsap.plugins { 23 | interface TextPlugin extends Plugin { 24 | 25 | } 26 | 27 | interface TextPluginClass extends TextPlugin { 28 | new(): PluginScope & TextPlugin; 29 | prototype: PluginScope & TextPlugin; 30 | } 31 | 32 | const text: TextPluginClass; 33 | } 34 | 35 | declare const TextPlugin: gsap.plugins.TextPlugin; 36 | 37 | declare module "gsap/TextPlugin" { 38 | export const TextPlugin: gsap.plugins.TextPlugin; 39 | export { TextPlugin as default }; 40 | } 41 | 42 | declare module "gsap/src/TextPlugin" { 43 | export * from "gsap/TextPlugin"; 44 | export { TextPlugin as default } from "gsap/TextPlugin"; 45 | } 46 | 47 | declare module "gsap/dist/TextPlugin" { 48 | export * from "gsap/TextPlugin"; 49 | export { TextPlugin as default } from "gsap/TextPlugin"; 50 | } 51 | 52 | declare module "gsap/all" { 53 | export * from "gsap/TextPlugin"; 54 | } 55 | 56 | declare module "gsap-trial/TextPlugin" { 57 | export * from "gsap/TextPlugin"; 58 | export { TextPlugin as default } from "gsap/TextPlugin"; 59 | } 60 | 61 | declare module "gsap-trial/src/TextPlugin" { 62 | export * from "gsap/TextPlugin"; 63 | export { TextPlugin as default } from "gsap/TextPlugin"; 64 | } 65 | 66 | declare module "gsap-trial/dist/TextPlugin" { 67 | export * from "gsap/TextPlugin"; 68 | export { TextPlugin as default } from "gsap/TextPlugin"; 69 | } 70 | 71 | declare module "gsap-trial/all" { 72 | export * from "gsap/TextPlugin"; 73 | } 74 | -------------------------------------------------------------------------------- /types/utils/velocity-tracker.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace gsap { 2 | 3 | type VelocityType = "num" | "deg" | "rad"; 4 | 5 | interface VelocityMap { 6 | [key: string]: number; 7 | } 8 | 9 | interface VelocityTrackerInstance { 10 | readonly target: object; 11 | add(property: string, type?: VelocityType): void; 12 | kill(shallow?: boolean): void; 13 | remove(property: string): void; 14 | getAll(): VelocityMap; 15 | get(property: string): number; 16 | } 17 | 18 | interface VelocityTrackerStatic { 19 | getByTarget(target: TweenTarget): VelocityTrackerInstance; 20 | getVelocity(target: TweenTarget, property: string): number; 21 | isTracking(target: TweenTarget, property?: string): boolean; 22 | track(target: TweenTarget, properties: string, type?: VelocityType): VelocityTrackerInstance[]; 23 | untrack(target: TweenTarget, properties?: string): void; 24 | } 25 | 26 | interface VelocityTracker extends VelocityTrackerStatic { 27 | new(target: TweenTarget, properties?: string, type?: VelocityType, next?: VelocityTrackerInstance): VelocityTrackerInstance; 28 | prototype: VelocityTrackerInstance; 29 | register(core: typeof gsap): void; 30 | } 31 | } 32 | 33 | declare const VelocityTracker: gsap.VelocityTracker; 34 | 35 | declare module "gsap/utils/VelocityTracker" { 36 | export const VelocityTracker: gsap.VelocityTracker; 37 | export { VelocityTracker as default }; 38 | } 39 | 40 | declare module "gsap/src/utils/VelocityTracker" { 41 | export * from "gsap/utils/VelocityTracker"; 42 | export { VelocityTracker as default } from "gsap/utils/VelocityTracker"; 43 | } 44 | 45 | declare module "gsap-trial/utils/VelocityTracker" { 46 | export * from "gsap/utils/VelocityTracker"; 47 | export { VelocityTracker as default } from "gsap/utils/VelocityTracker"; 48 | } 49 | 50 | declare module "gsap-trial/src/utils/VelocityTracker" { 51 | export * from "gsap/utils/VelocityTracker"; 52 | export { VelocityTracker as default } from "gsap/utils/VelocityTracker"; 53 | } 54 | --------------------------------------------------------------------------------