Skip to content

Commit

Permalink
3.6.0
Browse files Browse the repository at this point in the history
- NEW: Flip Plugin smoothly animates between DOM layout changes. See https://greensock.com/flip

- NEW: DrawSVGPlugin can now accommodate values outside of the 0-100% range, meaning you can loop/wrap strokes easily. We even shaved off some kb in the process.

- NEW: you can set a ScrollTrigger's snap value to "labelsDirectional" and instead of snapping to the closest label, it will snap to the NEXT or PREVIOUS timeline label based on the velocity/direction of the timeline's playhead. This means users don't have to scroll beyond halfway between sections, for example - if they scroll even a little bit and release, it will go to the next/previous label in that direction.

- NEW: hex colors with alpha are recognized, like #fd5e53ff. See https://greensock.com/forums/topic/26703-text-shadow-property-not-animated/

- IMPROVED: added the ability for ScrollToPlugin to accommodate a function-based value, like scrollTo: () => ...

- IMPROVED: when animating CSS-related values in a .fromTo() animation, GSAP will attempt to pull the starting values directly from the "from" vars object instead of using the computed values that the browser reports so that you can do things like gsap.fromTo(el, {top: "calc(10vh / 2)"}, {top: "calc(50vh / 2)"}). Notice that the formatting needs to match for complex strings like that. See the original request at https://greensock.com/forums/topic/25568-problems-with-calc-values/

- IMPROVED: worked around a Firefox bug that incorrectly reports getBoundingClientRect() when the element's scale (transform) is exactly 0 - it could interfere with the align feature in MotionPathPlugin.

- IMPROVED: CSS variables now attempt to interpolate between units like if --radius: 8vh is animated to 1em, for example.

- IMPROVED: if you set an xPercent or yPercent on an element and then clearProps, the next time transforms are parsed, the percentage-based translation will be prioritized over px-based translation because that's typically the desired behavior.

- IMPROVED: gsap.utils.random() was slightly less likely to choose a value at the very minimum or maximum, but now it's equal across all values. See https://greensock.com/forums/topic/26524-does-gsaputilsrandom-include-or-exclude-its-minmax/

- IMPROVED: Draggable's onClick callback now gets triggered by code-triggered events on the target element, like element.click(). See https://greensock.com/forums/topic/26513-draggable-html-click-event-not-triggering-onclick-handler

- IMPROVED: ScrollTrigger copies the z-index to the pin-spacer element (for pinned elements). See https://greensock.com/forums/topic/26570-scrolltrigger-pinning-and-z-index-question/

- IMPROVED: if you don't define a "trigger" or a "start" on a ScrollTrigger, it would default to using <body> as the target and start: "top top" which in some rare cases might cause odd start/end values (like if you translate things higher and stretch beyond the top of the <body>), so now it defaults to an absolute start of 0. See https://greensock.com/forums/topic/26626-customscrollbar-scrolltrigger-draggable/

- FIXED: minor TypeScript improvements, like https://greensock.com/forums/topic/25346-morphsvg-shape-error-angular-typings/ and #421 and #422

- FIXED: if a paused child animation of a completed timeline resumes, and that parent timeline has smoothChildTiming: true, it wasn't getting re-activated. See https://greensock.com/forums/topic/25349-no-transition-instant-snap-issue/

- FIXED: if a CSS variable had a space in front of it where the CSS was declared, like --var: 20px, that would interfere with unit conversion in gsap.getProperty(element, "--var", "em"), for example.

- FIXED: in GSDevTools, if you resume a timeline via code that had also been paused via code (not through the GSDevTools interface), it wouldn't be reflected as such by the UI and it could cause it to loop.

- FIXED: in browserless environments (or SSR that may make calls before the DOM is available), a call to ScrollTrigger.refresh() could throw an error in 3.5.1. See #415

- FIXED: if immediateRender was set to true on a timeline.tweenTo()/tweenFromTo(), it could throw an error. See #414

- FIXED: if you try to do a scrollTo animation to an element that doesn't exist, it would throw errors instead of defaulting to 0.

- FIXED: regression in Draggable 3.5.0 caused fixed-position elements not to factor scroll position into their x/y drags (they could jump if you scroll down and then drag a fixed-position element). Only if there was no margin or padding on the <body>. See https://greensock.com/forums/topic/23088-draggable-fixed-elements-disappear-when-dragging-after-scroll/?tab=comments#comment-123425

- FIXED: animating a complex string value with extremely small numbers that had scientific notation like -4.1245e-15 didn't work properly. See https://greensock.com/forums/topic/25485-tween-float-values-in-svg-path/

- FIXED: if you set pinType: "transform" and markers: true but you do NOT specify a scroller on a ScrollTrigger, it could throw an error. See https://greensock.com/forums/topic/25606-bug-report-scrolltrigger-pintype-and-markers/

- FIXED: if you tried to animate zIndex without setting autoRound: true, it didn't work properly in some browsers because they ignore any values that contain decimals.

- FIXED: in very rare cases, an infinitely-repeating animation with a small duration that's set to a progress of 1 could render incorrectly due to a rounding issue.

- FIXED: if you create two tweens that BOTH affect the same property, and one has a ScrollTrigger that hasn't fired yet but overwrite is set to "auto", it could lock in the initial value incorrectly (before the other tween completes).

- FIXED: if the target of a Draggable has its transforms cleared/uncached and that Draggable has bounds applied, it could cause the target to be incorrectly positioned onPress.

- FIXED: if you SplitText an element with type: "lines" and it doesn't have a previousElement in the DOM, it could throw an error.

- FIXED: if you invalidate() a timeline whose playhead is at a non-zero position, it could initialize its child tweens in the wrong order leading to their starting values being incorrect in certain situations.

- FIXED: "xPercent" and "yPercent" are now correlated (measurement-wise) in MotionPathPlugin and the unit is automatically pulled from Array-based values passed in, like [{left:"20%"}, {left:"50%"}]. See https://greensock.com/forums/topic/25747-migrating-a-gsap-2-bezier-to-gsap-3-motionpath/

- FIXED: if the last point past in an Array to MotionPathPlugin was a duplicate of the previous one, it would plot the curved path oddly (wiggling). See https://greensock.com/forums/topic/25775-motion-path-issue/

- FIXED: if you define a %-based translation in x/y/translateX/translateY (which isn't recommended since xPercent/yPercent is the proper way to do that), and then attempt to animate to a px-based value, it could convert between units incorrectly. See https://greensock.com/forums/topic/25801-gsapdefaults-with-modifiers/

- FIXED: if you use ScrollTrigger.saveStyles() before creating a non-scrubbing ScrollTrigger with an animation associated with it, and then scroll to a place where that animation is at a non-zero position, a refresh() (resize) could cause the CSS styles to get reset without getting updated with that animation's changes. See https://greensock.com/forums/topic/25812-scrolltrigger-weird-behavior-when-resizing/

- FIXED: if you gsap.globalTimeline.clear(), it could cause an initial jump when starting to play subsequent animations.

- FIXED: if you accidentally set a ScrollTrigger's "start" to a position ABOVE the top of the page (invalid) and it has pinning enabled, it could offset the pinned element that amount from the top/left of the page.

- FIXED: worked around a Safari bug that could cause snapping in a ScrollTrigger to seem jerky and take a long time if the page was zoomed. Safari reports the scroll position incorrectly as 1 pixel off, so if scrollTop is set to 125, for example, and Safari would report it as 124. See https://greensock.com/forums/topic/25635-scrolltrigger-snap-issue/

- FIXED: if you used complex selector text for a MorphSVGPlugin path multiple times, it could think the path was malformed. See https://greensock.com/forums/topic/25852-morphsvg-malformed-path-problem/

- FIXED: if you load GSDevTools and also have a ScrollTrigger with a numeric scrub value and attempt to scroll sooner than 2 seconds after page load, the scrubbing wouldn't work initially.

- FIXED: zIndex animations that start or end with "auto" didn't round the value during the animation (and browsers refuse to render non-whole numbers for zIndex).

- FIXED: if you define a motionPath with a "start" and "end" that contain a value that's **almost** a whole iteration apart like start: 2.8 / 5 (0.5599999999999999), end: 2.8 / 5 + 1 (1.56), it would get clipped and act like it has a length of 0. See https://greensock.com/forums/topic/25938-animate-text-on-an-svg-path/?tab=comments#comment-125937

- FIXED: if you use ScrollTrigger.saveStyles() on elements that are also controlled by a non-scrubbing ScrollTrigger from() animation created in a ScrollTrigger.matchMedia(), resizing the window could cause the inline styles not to be rendered correctly at the from() position. See https://greensock.com/forums/topic/25944-problem-with-scrolltriggersavestyles-and-scrolltriggermatchmedia/

- FIXED: if you kill() a tween and then tried to play() it again, it would work (unless you called kill() twice). See https://greensock.com/forums/topic/25963-killing-the-tween-issue/

- FIXED: if you had a .set() call right at the very beginning of a timeline, rewinding to that spot after the playhead had moved forward would cause the set() to revert to its very starting values. See https://greensock.com/forums/topic/26049-issue-with-starting-positions/

- FIXED: if you created a ScrollTrigger with a refreshPriority inside a gsap.timeline() and called ScrollTrigger.refresh(), the priority may not be set properly unless ScrollTrigger.refresh() is called after one tick. See https://greensock.com/forums/topic/26126-2-animations-on-same-page-second-one-loading-first-causing-issues

- FIXED: if a motionPath tween used negative start/end values such that they'd wrap (in the negative direction), it wouldn't work. See https://greensock.com/forums/topic/26197-bug-motionpathplugin-unsets-element-position-when-looping-in-negative-direction/

- FIXED: if a motionPath tween used a start and end value that were almost exactly 1 apart but used lengthy decimal values (like beyond 5 decimal places), it may act like the path has a length of zero. See https://greensock.com/forums/topic/26338-where-is-the-bug/

- FIXED: ScrollTrigger showed a console.warn() in Safari regarding scrollBehavior not being a valid property because Safari doesn't support it. That warning is removed now. See https://greensock.com/forums/topic/25199-sliding-window/?tab=comments#comment-127143

- FIXED: worked around some Android/MS issues that affected Draggable's allowNativeTouchScrolling. See https://greensock.com/forums/topic/24166-cross-browser-issues-with-draggable-and-allownativetouchscrolling/

- FIXED: if you add extra padding to a CSS value with a unit, like "3.1000rem", it could get interpreted incorrectly. See https://greensock.com/forums/topic/26352-possible-bug-with-rem-values-like-3100rem/

- FIXED: if you set pinSpacing: false and pinned the SAME element multiple times, on subsequent refresh() calls (like on window resize), a cached value was used which could cause the element to move further and further from where it's supposed to be on each refresh(). See https://greensock.com/forums/topic/26411-multiple-pinned-scrolltriggers-on-the-same-element-wrong-offset-on-resize/

- FIXED: if you go full-screen on an element that's in an iframe, it could force a refresh() which would reload that inframe content, effectively making it impossible to go full-screen. See https://greensock.com/forums/topic/26281-full-screen-video-issue/

- FIXED: a Chrome/Brave (Webkit) update caused ScrollTriggers with pinReparent: true to be positioned incorrectly in some cases because inset CSS values contaminate top/left positioning.

- FIXED: if you re-create a ScrollTrigger.scrollerProxy() on the same element multiple times, it would cache the first one and use the getter/setter functions for that (always). See https://greensock.com/forums/topic/26468-scrolltriggerscrollerproxy-stopped-after-route-change/

- FIXED: disallowed adding the following keys to gsap.defaults() and gsap.config(): __proto__, constructor, and prototype

- FIXED: in some rare cases with negative numbers, gsap.utils.snap() would return an incorrect value. See https://greensock.com/forums/topic/26551-bug-in-snap-utility/

- FIXED: if you set dragClickables: false on a Draggable, event.preventDefault() could be called [incorrectly] when clicking on a clickable element like an <a> or <button> immediately after dragging the ancestor element, meaning the link wouldn't be followed (typically just on mobile devices). See https://greensock.com/forums/topic/26547-gsap-draggable-plugin-issues-with-dragclickables-in-touchscreen/

- FIXED: if you set up a ScrollTrigger with a snap value, on a Windows desktop device it may not kill the snapping immediately when the user attempts to scroll with the mousewheel. See https://greensock.com/forums/topic/26600-scrolltrigger-intermittent-scroll-locking-during-snapping/

- FIXED: if you used SplitText to split the same element multiple times without "words", it could incorrectly lose spaces in some rare cases.

- FIXED: if you fed duplicate values in at the very start of a motionPath Array, it could hang. For example, if you do a .fromTo() and set the initial values AND put those same values into the start of the "path" Array, that'd trigger the issue. See https://greensock.com/forums/topic/26663-browser-crash-while-using-the-motion-path-plugin/

- FIXED: TypeScript definitions updated for gsap.timeline so that if you gsap.registerEffect({... extendTimeline: true}) it'll allow any property to be added to timelines.

- FIXED: if you kill() a ScrollTrigger with a pin, and then re-create it and the pinned element has different margins, the old ones stuck around instead.
  • Loading branch information
jackdoyle committed Jan 12, 2021
1 parent 147a6b6 commit e066b1f
Show file tree
Hide file tree
Showing 71 changed files with 1,765 additions and 1,167 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#### Professional-grade animation for the modern web

GSAP is a JavaScript library for building 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 <a href="https://greensock.com/scrolltrigger">ScrollTrigger</a> 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! See https://greensock.com/why-gsap/ for what makes GSAP so special.
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! GSAP's <a href="https://greensock.com/scrolltrigger">ScrollTrigger</a> 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! See https://greensock.com/why-gsap/ for what makes GSAP so special.

### What is GSAP? (video)

Expand All @@ -18,7 +18,7 @@ View the <a href="https://greensock.com/docs">full documentation here</a>, inclu

### CDN
```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.1/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.6.0/gsap.min.js"></script>
```
Click the green "Get GSAP Now" button at <a href="https://greensock.com/?download=GSAP-JS">greensock.com</a> for more options and installation instructions, including CDN URLs for various plugins.

Expand Down Expand Up @@ -56,7 +56,7 @@ Download <a href="https://greensock.com/club/">Club GreenSock</a> members-only p

### ScrollTrigger

If you're looking to do scroll-driven animations, GSAP's <a href="https://greensock.com/scrolltrigger">ScrollTrigger</a> plugin is a great option.
If you're looking to do scroll-driven animations, GSAP's <a href="https://greensock.com/scrolltrigger">ScrollTrigger</a> plugin is the new standard.

[![ScrollTrigger](http://greensock.com/_img/github/thumb-scrolltrigger-small.gif)](http://greensock.com/scrolltrigger)

Expand Down Expand Up @@ -96,4 +96,4 @@ Sign up for a free GreenSock account to gain access to <a href="https://greensoc
### License
GreenSock's standard "no charge" license can be viewed at <a href="https://greensock.com/standard-license">http://greensock.com/standard-license</a>. <a href="https://greensock.com/club/">Club GreenSock</a> members are granted additional rights. See <a href="https://greensock.com/licensing/">http://greensock.com/licensing/</a> for details. Why doesn't GreenSock use an MIT (or similar) open source license, and why is that a **good** thing? This article explains it all: <a href="https://greensock.com/why-license/" target="_blank">http://greensock.com/why-license/</a>

Copyright (c) 2008-2020, GreenSock. All rights reserved.
Copyright (c) 2008-2021, GreenSock. All rights reserved.
6 changes: 3 additions & 3 deletions dist/CSSRulePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
}(this, (function (exports) { 'use strict';

/*!
* CSSRulePlugin 3.5.1
* CSSRulePlugin 3.6.0
* https://greensock.com
*
* @license Copyright 2008-2020, GreenSock. All rights reserved.
* @license Copyright 2008-2021, GreenSock. All rights reserved.
* Subject to the terms at https://greensock.com/standard-license or for
* Club GreenSock members, the agreement issued with that membership.
* @author: Jack Doyle, jack@greensock.com
Expand Down Expand Up @@ -51,7 +51,7 @@
};

var CSSRulePlugin = {
version: "3.5.1",
version: "3.6.0",
name: "cssRule",
init: function init(target, value, tween, index, targets) {
if (!_checkRegister() || typeof target.cssText === "undefined") {
Expand Down
6 changes: 3 additions & 3 deletions dist/CSSRulePlugin.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/CSSRulePlugin.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e066b1f

Please sign in to comment.