Skip to content

Tags: greensock/GSAP

Tags

3.15.0

Toggle 3.15.0's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.15.0

- NEW: adaptive directional easing via a new "easeReverse" property which allows you to define a different ease to be used in reverse (when the animation's playhead moves backwards). yoyoEase is deprecated in favor of easeReverse. See https://gsap.com/blog/3-15

- FIXED: on case-insensitive systems, a TypeScript error could be thrown when importing Draggable, Observer, or Flip plugins. See #637

- FIXED: if you create GSAP-related objects inside a ScrollTrigger's snap onStart/onComplete and the ScrollTrigger was created inside a gsap.context() (including in the React useGSAP() hook), they wouldn't be associated with that context and therefore may not be cleaned up properly. See https://gsap.com/community/forums/topic/45266-scrolltrigger-snapping-problem-when-trying-to-create-a-scroll-slideshow/

- FIXED: SplitText may fail to split elements inside an iframe. See #640

- FIXED: in some cases, if ScrollTrigger is loaded AFTER the core GSAP library, it wouldn't integrate Observer properly with ScrollTrigger which could lead to odd behavior like if the <html> element had scroll-behavior: smooth, it wouldn't properly get removed during ScrollTrigger's refresh which could break pinning on resize. See https://gsap.com/community/forums/topic/45290-scroll-behavorsmooth-issue/

- FIXED: in SplitText, if you set a wordsClass, charsClass, or linesClass with an increment ("++", like wordsClass: "word++") AND a mask on that same part (like mask: "words"), the resulting mask element would only have the "-mask" part applied to the incremented class like "word word1-mask" instead of "word-mask word1-mask".

- FIXED: if you gsap.registerPlugin(ScrollTrigger) BEFORE the <body> (like inside the <head>), and then attempt to add a scrollerProxy(), it could throw an error. ScrollTrigger needs access to the <body> so if it's not present yet when you try to register, it can't fully instantiate. Now ScrollTrigger will add a DOMContentLoaded listener in that case.

- FIXED: if you set a ScrollTrigger so that its "scroller" is an iframe element, the markers may not show up. See https://gsap.com/community/forums/topic/45330-scrolltrigger-pin-not-working-in-iframe/

- FIXED: SplitText no longer does a console.warn() when it's called BEFORE the fonts were loaded because some browsers were reporting that fonts were reloading on resize (thus warnings were being fired too frequently due to browsers behaving oddly in the way they reported font loading status).

- FIXED: a JSDoc comment on the play() method was misleading - it indicated that play(true) would play from the current playhead position but instead the boolean "true" would be coerced to 1 and the animation would start from the 1-second spot in that scenario. See #643

3.14.2

Toggle 3.14.2's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.14.2

- IMPROVED: When a new SplitText instance is created, it will now check to see if any of the targets were already split as a part of another SplitText instance and if so, it'll restore the original content first in order to avoid duplicate splitting. This is not the same as calling revert() on the original/competing SplitText instance because it very well may target many other elements that shouldn't be reverted. It won't affect the isSplit state of the original/competing SplitText instance either. If you prefer to allow the duplicates, you can now set overwrite: false on the SplitText config object.

- IMPROVED: SplitText recognizes Arrays populated with selector text like [".split-1", ".split-2", ".split-3"], although honestly it's cleaner to just do one combined selector text string like ".split-1, .split-2, .split-3". We just wanted to make it backwards compatible with what has historically worked in GSAP.

- FIXED: the ESM version of SplitText distributed via NPM had a compiler-introduced issue that could cause character splitting to produce EMPTY elements. Regression since version 3.14.0. See #636

3.14.1

Toggle 3.14.1's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.14.1

- FIXED SplitText regression in 3.14.0 could cause extra line breaks (only when the type included “lines”, of course).

3.14.0

Toggle 3.14.0's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.14.0

NEW: MorphSVGPlugin has a new "smooth" feature that's useful in cases where the mid-morph shape looks odd. In the vast majority of cases, MorphSVG does a great job without enabling smoothing, but now you can have MorphSVG distribute new anchors along the path somewhat evenly so that there are more places to bend and move to the new shape.

- NEW: MorphSVGPlugin has a new curveMode feature that prioritizes smooth anchor points staying smooth (avoiding kinks mid-morph).

- NEW: SplitText has a new kill() method that simply stops autoSplit behavior. This also means that if you create a SplitText inside a gsap.context(), and then you call .kill() on the context, it'll stop subsequent autoSplits.

- IMPROVED: MorphSVGPlugin's algorithm for adding new anchors has been improved to space them out more evenly (even without enabling "smooth"). In short, morphs will look even more natural when going between shapes with very different numbers of anchor points.

- IMPROVED: if SplitText is called before fonts finish loading, but you're NOT splitting by lines, there is no longer a console.warn("SplitText called before fonts loaded")

- IMPROVED: worked around a CSP that prohibits setAttribute("style", ...). See #623

- IMPROVED: added "exports" to the package.json file to improve compatibility with some bundlers. See #548

- IMPROVED: Draggable resets InertiaPlugin's velocity tracking immediately after onPress() so that if you make a big change to the target's position/rotation inside the onPress(), it doesn't risk making the velocity appear elevated.

- FIXED: if in the same animation, you animate/set a CSS variable (like "--clip-x": "2px") that has a unit/suffix, and ALSO a CSS variable that's a color (like "--background": "#FF0000"), it could inadvertently apply the unit/suffix to the color (which of course it shouldn't).

- FIXED: if you set the progress() or totalTime() or time() of a tween that had already rendered but then was invalidated and the playhead hasn't moved, it wouldn't get re-rendered.

- FIXED: animations created inside an onSplit() of a SplitText that's created inside a gsap.context() may not revert correctly. This could affect the useGSAP() hook in React apps.

- FIXED: if you set an onStart() callback on a timeline and then clear() it while it's playing, it would still call the onStart() callback. See https://gsap.com/community/forums/topic/44645-timelineclear-calls-onstart-on-a-repeated-timeline/

- FIXED: TypeScript definition improvement, see #620

- FIXED: GSDevTools had a CSS issue that caused it to be difficult to scrub all the way to the end by dragging the scrubber (regression). See https://gsap.com/community/forums/topic/44539-gsdevtools-problems-scrubbing-to-end/

- FIXED: if you define a "mask" for SplitText and the associated word/line/char class name contains characters that break word boundaries (like "my-class-name" where dashes separate the words), "-mask" would be inserted after each one instead of only appended to the end ("my-mask-class-mask-name-mask" instead of "my-class-name-mask").

- FIXED: if you use MotionPathHelper to edit a motion path that has fewer than 2 anchors and it's connected to an animation that MotionPathHelper is controlling, it could throw errors. Now it simply does a console.warn(). See https://gsap.com/community/forums/topic/44664-motionpathhelper-bug-found/

- FIXED: if "random()" is used inside a string for a tween's to/from value(s) but there are no values between the parentheses, it could throw an error. See https://x.com/sho4771k/status/1937144677519823301

- FIXED: an Observer's onStart() may not fire in newer releases of Safari (18.5+?) under very specific conditions (regression since 3.12.5). See https://gsap.com/community/forums/topic/44839-observer-ondragstart-stopped-working-in-safari-after-updating-to-gsap-3130

- FIXED: TypeScript definition for ScrollTrigger.removeEventListener() was missing "revert" type. See https://gsap.com/community/forums/topic/43055-scrolltrigger-addeventlistener-revert-not-in-typescript/#findComment-219367

- FIXED: worked around browser bugs in Chrome and Firefox that caused SVG masks not to report coordinates correctly like when using MotionPathPlugin. See https://gsap.com/community/forums/topic/44872-browser-regression-with-svg-motionpath-mask/

- FIXED: TypeScript definition for gsap.utils.distribute() now permits a number or function. See #624

- FIXED: Flip plugin may not properly position things if you set nested: true and fade: true and are flipping between two different elements that share the same data-flip-id. See https://gsap.com/community/forums/topic/44805-gsap-flip-plugin-nested-children-not-working-correctly-some-of-the-time-despite-setting-nested-true

- FIXED: in old browsers that have Intl but not Intl.Segmenter, SplitText may throw an error. See #626

- FIXED: if you call CustomEase.getSVGData() multiple times on the same CustomEase instance, it may return different results after the first time. See https://codepen.io/Anemolo/pen/oNrMGqQ?editors=0011

- FIXED: if you create an animation that you then pass directly to ScrollTrigger.create({ animation }) inside a gsap.context(), reverting that context may not appropriately revert the ScrollTrigger. See https://codepen.io/GreenSock/pen/empBGem/454481637fe42aac378e723ede0f86e5?editors=0010

- FIXED: if you set invalidateOnRefresh: true on a ScrollTrigger in a gsap.from() or gsap.fromTo() animation, it may not render the initial state properly. Demo: https://codepen.io/GreenSock/pen/PwPeNOJ?editors=1111

- FIXED: for GSDevTools, if you set the animation to a parent timeline and then name child animations and select one of those from the UI drop-down, it may use the wrong start/end times. See https://codepen.io/snorkltv/pen/LEpBVbv

- FIXED: if you call .then() multiple times on a single animation, it would only call the last one. See #628

- FIXED: if you used a Draggable of type: "rotation", the onDragStart() could be called prematurely after the very first drag (so on the 2nd and beyond). See https://gsap.com/community/forums/topic/44973-click-to-rotate-tween-conflicts-with-draggable-rotation-and-create-glitches-when-drag-immediately-after-click/

- FIXED: if you animate a transform-related value (like x or y) to a CSS variable (like x: "var(--offset)") and that variable uses calc(), it wouldn't work properly. See https://codepen.io/GreenSock/pen/gbaQzje

- FIXED: if you set fill="none" on an <svg> element, Firefox wouldn't report coordinates correctly which could throw off MotionPathPlugin's "align" feature. See https://gsap.com/community/forums/topic/45099-problem-with-motion-path-on-firefox-143/

- FIXED: ScrollSmoother could place ScrollTriggers incorrectly if the page was already scrolled when refreshed or resized. See https://gsap.com/community/forums/topic/45138-scrollsmoother-stops-and-scrolltrigger-misaligned-in-browser-dev-tools

- FIXED: in a very rare edge case, an error could be thrown by ScrollTrigger when "once" is used in a batch with pinning. See https://gsap.com/community/forums/topic/40242-scrolltriggerbatch-bug-with-once-scrolltriggers

- FIXED: at least one 3rd party WordPress plugin messes with the window.default object in such a way that it can cause an error with SplitText (it's unrelated to GSAP/SplitText - it's related to how Rollup bundles things), so we worked around it in this release. It was fixed a long time ago in the main GSAP files, but the new 3.13.0 SplitText didn't have that fix (until now). See https://gsap.com/community/forums/topic/22009-gsap3-vs-wordpress-53-mediaelementjs-conflict/

- FIXED: ScrollTriggers with pinning that extended the scrollHeight of the page might cause the page to scroll up to the very top of the page when the window was resized between portrait and landscape orientation. See https://gsap.com/community/forums/topic/45205-resize-update/

- FIXED: the horizontalLoop() helper function had a bug that could cause the elements to zoom in one direction or another under the right conditions. It was related to an issue with VelocityTracker that InertiaPlugin used, where it would always record the initial tracked property value as 0 instead of whatever it was at the time tracking began. That's fixed now too (the helper function now has a workaround that allows it to work even if you don't use 3.14.0, but of course we recommend updating to the latest version of InertiaPlugin and Draggable). Draggable now resets the tracking right after the onPress() is invoked in order to accommodate scenarios where you edit the property value directly inside the onPress() or onPressInit(). See https://gsap.com/community/forums/topic/44932-horizontalloop-helper-drag-touchscreen-bug/ and https://gsap.com/community/forums/topic/43280-seamless-loop-helper-function-vertical-draggingscrolling-bug-with-horizontal-loop/

- FIXED: SplitText now handles multiple (sequenced) <br> (BR) tags properly, eliminating only the first in a sequence because splitting lines into <div> wrappers with display: inline-block already duplicates the behavior of the first in the sequence.

- FIXED: SplitText didn't properly split the very first line if it only contained one word (when splitting by "lines"). See #633

3.13.0

Toggle 3.13.0's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.13.0

- NEW: Thanks to Webflow, GSAP is now **100% FREE** including ALL of the bonus plugins like SplitText, MorphSVG, 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!** 🤯 So now the public repository has all of the bonus plugins. You can read more about this on Webflow's blog: https://webflow.com/blog/gsap-becomes-free

- NEW: SplitText was completely rewritten, 50% smaller and 14 new features. There were a few VERY uncommon breaking changes. See https://gsap.com/blog/3-13 for details.

- NEW: you can animate a CSS value to something like "var(--my-variable)".

- IMPROVED: if you set the "ignore" property of an Observer, it now ignores descendants of those elements too.

- IMPROVED: modifiers plugin and endArray plugin will work even in headless environments (where there's no "window" defined). See https://gsap.com/community/forums/topic/44301-nodejs-gsap-modifiers/

- IMPROVED: GSDevTools has the new GSAP branding.

- FIXED: if you use Pixi.js version 8+ and attempted to animate more than one filter on an element, PixiPlugin could throw an error.

- FIXED: if you try to Flip an element that's in the shadowRoot (like in a Web Component), it may not calculate the position correctly. See https://gsap.com/community/forums/topic/44135-gsap-web-components/

- FIXED: drawSVG may appear to jump near the very end or start if the path is adequately short or uses very small numbers. See https://gsap.com/community/forums/topic/44072-drawsvg-on-mask-issue/

- FIXED: if you Flip an element that has transforms applied only via a CSS rule (not via GSAP or inline), it may not interpret it correctly. See https://gsap.com/community/forums/topic/44321-bug-on-fixed-position-using-flip/

- FIXED: if you change the timeScale of a timeline that has a cached duration value, it may incorrectly calculate the time. See https://gsap.com/community/forums/topic/44232-if-globaltimelinetimescale-is-set-immediately-after-timeline-played-the-start-of-the-animation-will-be-delayed/

- FIXED: typo in the gsap.utils.mapRange() method. See #615

- FIXED: a Flip.fit() with a duration set may immediately apply the extra props. See https://gsap.com/community/forums/topic/44398-flipfit-props-not-transitioning/

- FIXED: regression in 3.12.6 that could cause a ScrollTrigger on an animation with immediateRender: false not to initialize with the correct value. See https://gsap.com/community/forums/topic/44387-initial-states-of-fromto-tweens-in-a-scrolltrigger/

- FIXED: if the playhead of a repeated animation traveled from the very start all the way past the first iteration, its onStart wouldn't be called. See https://gsap.com/community/forums/topic/44466-onstart-not-called-when-on-low-fps/

- FIXED: from() and fromTo() tweens inside a timeline that hasn't been rendered yet but gets reverted wouldn't have their initial (immediateRender) values reverted. This manifested in ScrollTriggered timelines that had from() tweens and invalidateOnRefresh: true not being rendered correctly. See https://gsap.com/community/forums/topic/44365-how-to-properly-clear-cached-tweens-after-resize/

3.12.7

Toggle 3.12.7's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.12.7

- FIXED: regression in 3.12.6 that set pointer-events: none on ScrollTrigger pin spacers which caused descendents to stop responding to clicks and other pointer events.

- FIXED: regression in 3.12.6 that could throw an error if you don’t pass a vars/config object to Flip.fit().

3.12.6

Toggle 3.12.6's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.12.6

- IMPROVED: if you set immediateRender: true on a motionPath tween, it'll force the initial render to put that element on the path right away.

- IMPROVED: ScrollTrigger.sort() uses a better default algorithm that prioritizes the vertical position of the trigger element instead of the calculated start position of the ScrollTrigger. See https://gsap.com/community/forums/topic/40584-scrolltriggerrefresh-doesnt-do-anything-after-pinned-sections-are-dynamically-loaded/

- IMPROVED: TypeScript definition for MotionPathPlugin, like for allowing strings in the Array-based syntax, like [{x: "100vw"}] and function-based values for start/end. See https://gsap.com/community/forums/topic/40894-typescript-errors-for-start-and-end-fields-for-motionpath/ and #578

- IMPROVED: you can pass true to ScrollTrigger.refresh(true) to have it do a "safe" refresh, meaning that if the page is in the middle of scrolling, it'll wait until it's done before doing the refresh. That way, it won't kill an in-progress momentum scroll. See https://gsap.com/community/forums/topic/40935-gsap-scrolltrigger-start-position-breaks-on-dom-changes/

- IMPROVED: added pointer-events: none to pin spacer elements that ScrollTrigger creates which helps work around a Chrome browser bug.

- IMPROVED: Expo ease was enhanced to eliminate the possible jump at the very end. See https://gsap.com/community/forums/topic/25331-weird-jump-at-end-of-tween-with-expoout-ease/

- FIXED: if you set a zIndex on a Flip.fit(), it works now.

- FIXED: reading transform-related properties on a position: fixed element that has no transforms applied could result in the element getting temporarily added to the DOM at the root which could cause iframe content to reload, like a Vimeo video. See https://gsap.com/community/forums/topic/39645-flip-with-iframe-causes-iframe-to-rerender/

- FIXED: repeatRefresh may not actually refresh in a very rare condition (regression in 3.12.3).

- FIXED: if you use special characters like >,<, &, etc. in a TextPlugin tween on an SVG element, those characters could get replaced with the HTML code (like &gt; for >). See https://gsap.com/community/forums/topic/35550-handwritng-and-typewriter-animation-on-path-in-svg/

- FIXED: if you gsap.registerPlugin(ScrollTrigger) in an SSR framework like Next.js, it could complain that a style attribute was added to the document.body. That's removed now.

- FIXED: if you set a non-zero stagger value in gsap.defaults() (which is a very strange thing to do), it could throw an error when creating a gsap.quickTo().

- FIXED: repeatRefresh is in the TypeScript definitions now for staggers. See #595

- FIXED: on a motionPath tween, if you use an Array-based path with targets that have a "style" property but are NOT DOM nodes, and the properties have names that are transform-related like x, y, scaleX, scaleY, etc., it could throw errors. See https://gsap.com/community/forums/topic/40023-motionpath-plugin-problem/

- FIXED: if you navigate back to a page that then reuses the same ScrollTrigger instance (like a React routing change), a timeline that has a scrubbed ScrollTrigger may not render the playhead at the right in-progress spot. See https://gsap.com/community/forums/topic/39982-scrolltrigger-breaks-when-navigating-back-usegsap-react-react-router/

- FIXED: on an Observer, if you set passive: false that may be ignored unless preventDefault is true. This is fixed now.

- FIXED: ScrollTriggers with a containerAnimation may not refresh their start/end values correctly if ScrollSmoother is used or ScrollTrigger.sort() is called. See https://gsap.com/community/forums/topic/37419-horizontal-scroll-resize/

- FIXED: on a tween with repeatRefresh: true, it may skip the refreshing of values if the parent playhead lands beyond where the repeat spot is, but by less than 0.000001 seconds (exceedingly rare!).

- FIXED: if you do a .from() animation of borderRadius using a unit of "rem", it may jump a bit at the very end of the tween. See https://gsap.com/community/forums/topic/40096-scroll-trigger-auto-scroll-back-and-animation-over-shoot/

- FIXED: if you revert() a gsap.context() that has a ScrollTrigger with a scroller that's not the window, it could cause snapping to no longer function. This affects the @gsap/react package's useGSAP() hook too. See https://gsap.com/community/forums/topic/40198-snapping-breaks-when-re-rendering-in-react/

- FIXED: if you set once: true on the first ScrollTrigger (in terms of refreshPriority order) and it activates on page load (meaning its start is smaller than the page's current scroll position), it could throw an error. See https://gsap.com/community/forums/topic/40242-scrolltriggerbatch-bug-with-once-scrolltriggers/

- FIXED: if you set a minimumMovement on a Draggable of type: "rotation", it would interpret it in degrees rather than pixels, and a minimumMovement of 0 would actually default to 2 (degrees).

- FIXED: worked around an odd behavior in Firefox where the browser would fire pointermove events without the pointer moving at all which affected Observer's lockAxis behavior and it could prematurely fire an onDrag, etc.

- FIXED: if you kill() a completed tween that has a ScrollTrigger, it may not also kill the ScrollTrigger. See https://gsap.com/community/forums/topic/40359-gsap-kill-doesnt-stop-scrolltrigger-onupdate-from-running/

- FIXED: extremely rare edge case where a lazy-initted tween is initially set to render at a non-zero time but before that lazy tween renders lazily, a render is triggered at a time of 0, it could end up rendering at the wrong time (the lazy-initted one instead of the slightly later render).

- FIXED: orientation changes didn't properly trigger a ScrollTrigger.refresh(), so the start/end values of ScrollTriggers could be inaccurate after an orientation change. See https://gsap.com/community/forums/topic/40713-scrolltriggers-are-positioned-wrong-after-orientation-change/

- FIXED: an Observer may fire an onDrag() AFTER the onDragEnd() if debounce is true, but now it'll make sure it fires it BEFORE the onDragEnd(). Also, with debounce: false, an onDrag() could fire before the onDragStart(). See https://gsap.com/community/forums/topic/40909-observer-ondrag-firing-after-ondragend/

- FIXED: in a very uncommon scenario, creating ScrollTriggers inside a DOMContentLoaded event might cause the start/end values to be miscalculated. See https://gsap.com/community/forums/topic/41267-scrolltrigger-breaks-on-refresh-when-using-domcontentloaded/

- FIXED: MotionPathHelper.editPath() may throw an error if you add an anchor to a path that has MULTIPLE segments (more than one "M" command).

- FIXED: if you apply a snap to a ScrollTrigger that has a non-scrubbing animation, and the start is at 0 or less, it might restart the animation after the snap duration elapses on page load.

- FIXED: if you remove() an animation from a timeline that was NOT its parent, it could cause an error.

- FIXED: if you call CustomEase.get() in an SSR environment before the window object is defined, it could throw an error. See https://gsap.com/community/forums/topic/42510-gsapregisterplugin-in-nodejs-server/

- FIXED: some links in the TypeScript definitions file were incorrect since the gsap.com site launch.

- FIXED: in very rare cases, a CustomEase might end at something like 0.999999999 instead of 1 progress-wise (so values wouldn't quite land at the destination). That's resolved now.

- FIXED: if you clearProps on a target that contains individual transform component values applied in a CSS rule (like translate, rotate, or scale), it may not properly clear the transform. See https://gsap.com/community/forums/topic/43073-separate-transform-properties-like-rotate-and-scale-behave-differently-then-a-combined-transform/

- FIXED: regression in Flip.fit() could cause the width/height of the initial state not to be factored in, but only if there was a non-zero duration.

- FIXED: an Angular issue related to SVG elements that return an empty getBBox() which could cause an error due to the temporary reparenting and re-assigning the getBBox() method itself inside GSAP. See https://gsap.com/community/forums/topic/42859-gsap-321-override-of-the-svg-api-method-getbbox-removes-angular-dblclick-binding-from-dom-element/

- FIXED: if you disable() and then change the scroll position and then enable() an Observer, on the next scroll it could factor in the pre-disabled scroll position in the calculations, thus firing an onDown() or onUp() (for example) incorrectly.

- FIXED: if you restart() a zero-duration timeline that has an onComplete which already fired, it will fire that again after the restart(). See #604

- FIXED: zero-duration tweens wouldn't resolve then() Promises. See #590

- FIXED: TypeScript definition for getById() allows for undefined as a return type. See #589

- FIXED: ScrollSmoother doesn't set overscroll-behavior: none on the HTML/BODY anymore due to a Safari bug that caused that to stop the page from scrolling at all. See https://gsap.com/community/forums/topic/43802-loading-maps-api-scrollsmoother-in-safari-173-breaks-mousewheel-scroll-for-the-page/

- FIXED: PixiPlugin better accommodates the changes in Pixi.js version 7+, like fillColor and strokeColor. See #580

3.12.5

Toggle 3.12.5's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.12.5

- IMPROVED: ScrollTrigger's ignoreMobileResize is true by default now because a few versions back we switched to calculating the window height based on 100vh instead of window.innerHeight, so it really isn't necessary to force a .refresh() on mobile resize (address bar showing/hiding). This change improves performance on mobile devices because it skips the expensive refresh() when the address bar shows/hides.

- IMPROVED: removed a DisplayObject check in PixiPlugin so that it's more compatible with the upcoming release of Pixi.js version 8. See #561

- IMPROVED: the anticipatePin feature works when scrolling in either direction (previously it worked when scrolling forward only). See https://gsap.com/community/forums/topic/39521-anticipatepin-in-reverse/

- FIXED: regression in 3.12.3 could cause a ScrollTrigger that has a numeric scrub value and a snap to prematurely jump to the final progress value when the snap finished rather than waiting for the scrub to finish. See https://gsap.com/community/forums/topic/39363-scrolltrigger-scrub-clip-path-flicker-when-scroll-back/ and #567

- FIXED: regression in 3.12.3 could cause a tween with repeatRefresh: true AND a non-zero repeatDelay not to refresh. See https://codepen.io/GreenSock/pen/yLwLgNQ/db88d564d6308b9fcff7b65efb95febf?editors=1010

- FIXED: if you set a ScrollSmoother's effects() in a delayed fashion (after two ticks elapse after page load), it may not calculate offsets properly. See https://gsap.com/community/forums/topic/39380-scroll-smoother-effects-targets-jump-on-effectstrue/

- FIXED: regression in 3.12.3: if the playhead lands exactly on top of the yoyo position of a keyframed tween, it may render at the state before the animation started (just for 1 tick). See #558

- FIXED: if you set invalidateOnRefresh: true on a ScrollTrigger that's attached to a .fromTo() tween, it may not render at the initial state on refresh(). See https://gsap.com/community/forums/topic/39386-svgdraw-window-resize-issues/

- FIXED: if you create a gsap.matchMedia() inside a gsap.context() and then revert() that Context, it may not clear out non-matching media queries (they may fire again when matching). See https://gsap.com/community/forums/topic/39481-pin-spacer-is-double-the-height-it-should-be-after-window-resize/

- FIXED: if the system clock changes backwards to an earlier time, it could cause animations to stop. See #568

- FIXED: if a flexbox child is pinned by ScrollTrigger and pinSpacing is false, flex-basis is now set to the pixel height/width of the element to avoid common layout problems.

- FIXED: missing TypeScript parameter for ScrollTrigger.clearScrollMemory(). See #571

- FIXED: if you set a default stagger value via gsap.defaults(), it could cause an error in ScrollTrigger if you create one with a numeric scrub. See https://gsap.com/community/forums/topic/39600-scrolltrigger-numeric-scrub-throws-console-errors-in-gsap-core-cannot-read-properties-of-undefined-reading-totalprogress/

- FIXED: if a motionPath tween had a start or end value that wraps around and would land precisely on an anchor point that is not at the very start or end of a path, it could render incorrectly. See https://gsap.com/community/forums/topic/39594-why-are-content-1-and-content-2-overlaped-also-what-is-the-best-way-to-add-a-timeline-to-a-main-tween-or-timeline/

3.12.4

Toggle 3.12.4's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.12.4

- FIXED: regression in 3.12.3 could cause ScrollTriggers in gsap.matchMedia() to stop functioning after quick resizes that pass the matchMedia bounds. See https://gsap.com/community/forums/topic/39241-animations-freeze-after-a-few-window-resizes-and-using-gsapmatchmedia/

- FIXED: overwriting a scrollTo tween in such a way that didn't leave any more properties tweening, onInterrupt() wasn't invoked.

- FIXED: SplitText TypeScript definitions file needed an "elements" property. See #564

- FIXED: if you Promise.all() or .then() a timeline that already finished and has a zero duration, that Promise may not resolve properly. See https://gsap.com/community/forums/topic/39291-promiseall-dont-resolve-when-overwrite/

- FIXED: regression in 3.12.3 could cause transforms (x, y, scaleX, scaleY, rotation, etc.) on SVG elements to calculate the origin incorrectly. See https://gsap.com/community/forums/topic/39197-update-3123-broke-my-code-for-animating-clip-paths and #563

3.12.3

Toggle 3.12.3's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
jackdoyle Jack Doyle
3.12.3

- IMPROVED: gsap.context() and gsap.matchMedia() functions will get a 2nd argument that we'll call "contextSafe" which is like a wrapper for any function that you'd like to keep in the context. So any GSAP animations/ScrollTriggers/Draggables/Observers that are created during the execution of that function will be added to the context and the selector text will be scoped.

- IMPROVED: added a suppressEvents parameter to Tween/Timeline/Animation .timeScale() method so that you can optionally prevent it from suppressing events when altering the timeScale. See #551

- IMPROVED added an ignoreSpeed [3rd] parameter to ScrollSmoother's offset() method to allow you to specify whether you want to get the value that corresponds to the window's scroll position or the ScrollSmoother's scrollTop value. See https://greensock.com/forums/topic/35108-problems-with-the-scrollsmoother-plug-in-speed-option-in-gsap-3114/

- IMPROVED: Observer now fires an onStop with an onMove (previously it would only fire after a press). See https://greensock.com/forums/topic/38469-observer-misunderstanding-with-onchange-onmove-and-onstop/

- IMPROVED: slight change to TypeScript definitions for EaseString allows arbitrary strings while also activating code hinting for the common ones in more environments. See #556

- IMPROVED: animations/ScrollTriggers created inside a ScrollTrigger's callback like onEnter/onLeave/onToggle/onEnterBack/onLeaveBack will be added to the original Context (if one existed), meaning selector text will be scoped properly. See https://gsap.com/community/forums/topic/38850-reactgsap-why-i-cant-use-class-selector-in-scrolltrigger-inside-gsapcontext/

- IMPROVED: a ScrollTrigger's snap end position is limited to the resolution of the browser's scroll (whole pixels only), thus if you have a scrubbed animation that's supposed to snap to a very specific spot on that animation, it may end slightly off of that but now a correction runs at the end of the snap to ensure that it gets set PRECISELY to that snapped position. See https://gsap.com/community/forums/topic/38937-scrolltrigger-timeline-snapping-with-label-doesnt-snap-precisely-to-label-position/

- IMPROVED: the gsap-trial files will now work on domains that end in ".local" (for testing only please)

- FIXED: for an Observer, if you pressed, started dragging but released within 3 pixels of the original press, it wouldn't fire the onDragEnd. See https://greensock.com/forums/topic/37510-the-problem-that-ondragend-is-not-called-in-observer/

- FIXED: if you revert() a context/matchMedia that has a reversed animation, it may not render things in the proper order, potentially leaving inline styles when it shouldn't. See https://greensock.com/forums/topic/37432-issues-with-horizontalloop-helper/

- FIXED: if Draggable is applied to an <object> where the document isn't defined initially, an error could be thrown. See #549

- FIXED: if you apply a speed to a ScrollSmoother (other than 1), the offset() method would return a value that corresponds to the window's scroll position rather than the ScrollSmoother's scrollTop (which is affected by speed). See https://greensock.com/forums/topic/35108-problems-with-the-scrollsmoother-plug-in-speed-option-in-gsap-3114/

- FIXED: if you apply an onUpdate to a .fromTo() tween, the scope ("this") would be linked to the zero-duration "from" tween instead of the actual tween instance you'd expect, thus its progress() would be 1 instead of 0 at the very start.

- FIXED: if you define position: absolute on a SplitText and then revert(), the width/height inline styles could remain instead of getting cleared out. See https://greensock.com/forums/topic/38391-responsive-behavior-using-splittext/

- FIXED: if you create a ScrollTrigger with a "snap" and pin inside a gsap.matchMedia(), it could lead to incorrect positioning of the pinned element after a resize that makes it no longer match.

- FIXED: if you set a CSS value to "auto" (like height or width) via a GSAP tween and then you revert() it, the original computed value could be left as an inline style instead of cleared out.

- FIXED: if you call kill() or revert() on a MotionPathHelper in certain specific conditions, it may delete the original <path> itself.

- FIXED: worked around a very rare scenario where document.createElement() returns undefined and would consequently throw an error in CSSPlugin. See #553

- FIXED: if you create a staggered animation inside a gsap.context() or gsap.matchMedia() that affects the same element(s) as a gsap.set() that happened before that staggered animation and then the context/matchMedia gets reverted, the initial value may not get reverted properly.

- FIXED: if you animate a percentage-based width/height of an element whose parent has padding and/or is flexbox/grid, and the target element doesn't have that property already set inline, it may miscalculate the starting value of the tween. Related to https://gsap.com/community/forums/topic/38599-how-to-animate-object-fit/

- FIXED: if you create multiple SplitText instances on the same element inside a gsap.context() and then revert() that Context, it may not fully revert the element to its original state. See https://gsap.com/community/forums/topic/38734-splittext-innerwrap-renders-twice-in-strictmode/

- FIXED: if you set allowNestedScroll: true in the ScrollTrigger.normalizeScroll() feature, touch-scrolling on a link on a mobile device could result in a click event firing on that link. See https://gsap.com/community/forums/topic/38770-why-does-the-burger-menu-scroll-along-with-the-content-on-mobile/#comment-193009

- FIXED: if you set end: "max" or clamp() the end of a ScrollTrigger that has a pin, and the pinSpacing was extending the page taller, the dynamic adjustment of the end value would also affect the pinSpacing, reducing the maximum scroll area which then wouldn't be accurately reflected in the final end value.

- FIXED: if you define a stagger with grid: "auto" on an Array of elements that don't wrap at all (not really a grid), the last element's timing wouldn't be correct. See https://gsap.com/community/forums/topic/38536-when-scrolling-down-a-batch-the-stagger-doesnt-seem-to-work-correctly/

- FIXED: if you clamp() a ScrollTrigger's start value and it would naturally (without clamping) resolve to beyond the maximum scroll position, it wouldn't get clamped. Starting values were only clamped such that they weren't allowed to be negative (focused on the top of the page only, not the bottom too).

- FIXED: if you dynamically added/created a ScrollTrigger while ScrollSmoother was mid-scrub, it could lead to the scroll jumping. See https://gsap.com/community/forums/topic/37515-dynamic-scrolltrigger-with-pin-inside-a-scrollsmoother/

- FIXED: if you run SplitText on text that has words separated by non-breaking spaces (&nbsp;), it wouldn't recognize that as a word delimiter. See https://gsap.com/community/forums/topic/37271-why-does-the-splitted-node-from-splittext-includes-extra-whitespace-note-only-the-node-which-is-next-tag/

- FIXED: Flip.fit() is now gsap.context()-aware so that it'll revert inline styles when the context is reverted.

- FIXED: regression in 3.11 that could cause transformOrigin to lose its "z" portion if you apply it in a .from() or .fromTo() tween or a context that gets reverted. See https://gsap.com/community/forums/topic/38958-rotatey-not-working-in-nuxt/

- FIXED: if you call gsap.registerPlugin(Observer) multiple times, it could throw an error.