I am fully agree, and I have GSAP licence myself (other company account). But, what keeps me of sharing great thing open source, is the license rules. And when I saw Netlify and Sarah doing this, I was like, "wtf, I can do that?"
Hey. I just noticed that premium plugins are available for every developer from this repo <redacted>
Does this mean I can also share premium plugins in open source projects? Thanks.
First of all I am really frustrated that I had to spend so much time figuring out how to use PAID plugins. Sorry, but I am really frustrated, so I will speak about this.
Second, was it so hard to put clear documentation in SplitText chapter how to freaking install it???
So I am trying
import { gsap } from 'gsap'
import { MorphSVGPlugin } from 'gsap/MorphSVGPlugin'
import { ScrollTrigger } from 'gsap/ScrollTrigger'
import { SplitText } from 'gsap/SplitText'
gsap.registerPlugin(MorphSVGPlugin)
gsap.registerPlugin(ScrollTrigger)
gsap.registerPlugin(SplitText)
And what next??? It doesnt exist in window, and it doesnt exist in gsap property. Holy crap, guys. Why this need to be so ugly and confusing.
I have same problem. I can't use premium plugins because it's failing on Netlify build!!!
Changing to
"gsap": "file:assets/js/gsap-bonus.tgz",
didn't solve anything
The initial codepen is working (I don't know why links here are broken) - https://codepen.io/dhatt/pen/gOPOqJQ
So I need to pin after FROM part, then trigger TO part after pin.
@mikel tahnk you for that great example? I solved it other way, but good to know alternatives!
So my initial mistake was that I was trying to find the way to pin between fromTo animation. Which is seems impossible, right?
I did it with 2 different functions.
Let me explain more how this effect is done:
We put all headers (that have same height) in fixed element, that have same height and overflow hidden. Headers are absolute positioned.
Each header listens some section
When section is scrolled up to header height (100px in my codepen) - enter effect should be triggered. So header should be transitioned on Y axis from bottom until section reach the top
THEN IT SHOULD BE PINNED (this is where all issues are) until bottom of conteiner reach up to 100px of the top of the screen
And when it does - then fixed pinned header should start second - leaving part of the effect. In meanwhile - the next header should entering. And this is how effect is done
Now the question how to do this with new GSAP API? This actually pretty trivial with vanilla JS. But I wrap my head around with ScrollTrigger...