Share Posted March 15, 2020 I'm trying to convert Craig Roblewsky's See the Pen YRzRyM by PointC (@PointC) on CodePen to GSAP 3 but I'm getting a console log error that I don't understand. Can anyone take a look and see if it's a simple fix? I'd like to use this slider with GSAP3. Thanks! See the Pen XWbqNWK by jonroc (@jonroc) on CodePen Link to comment Share on other sites More sharing options...
Share Posted March 16, 2020 Did I hear my name mentioned? It's on my list to convert some of these old projects to GSAP 3, but just haven't had a chance yet. The error is because of the gsTransform in the tweenDot() function. You'll want to switch to the new getProperty() method. function tweenDot() { gsap.set(dotAnim, {time:Math.abs(gsap.getProperty(container, "x")/iw) + 1}); } More info: https://greensock.com/docs/v3/GSAP/gsap.getProperty() Also remember that ThrowProps is now InertiaPlugin. https://greensock.com/docs/v3/Plugins/InertiaPlugin Hopefully that helps. Happy tweening. 2 Link to comment Share on other sites More sharing options...
Author Share Posted March 17, 2020 Hey, the man himself 😁. Thank you, I'm much closer now but: There is an issue with the dots stagger animation Sometimes when I swipe right to left and then try to click the left arrow it gets stuck or I click the right arrow and it jumps way back to slide one or two. Sorry I thought this would be a little bit easier, this slider is a bit out of my level of expertise. Best. Link to comment Share on other sites More sharing options...
Author Share Posted March 18, 2020 I made a simpler example to troubleshoot why the drag function is not updating the active slide count: See the Pen ZEGRRLY by jonroc (@jonroc) on CodePen function slideAnim(e) { oldSlide = activeSlide; // dragging the panels if (this.id === "dragger") { activeSlide = offsets.indexOf(this.endX); console.log(activeSlide); } On the old setup the activeSlide variable is getting updated properly but with GSAP3 it always returns -1 Link to comment Share on other sites More sharing options...
Share Posted March 18, 2020 7 minutes ago, InTheOne said: On the old setup the activeSlide variable is getting updated properly but with GSAP3 it always returns -1 Good catch! This is related to a bug related to endX that has already been fixed in the latest beta: https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/gsap-latest-beta.min.js I am betting that Craig found it because you asked about converting this slider to GSAP 3 1 1 Link to comment Share on other sites More sharing options...
Share Posted March 18, 2020 1 hour ago, ZachSaucier said: I am betting that Craig found it because you asked about converting this slider to GSAP 3 Yep. I discovered that while converting the demos after this thread was started. @InTheOne I should have those conversions done shortly and will post them in my original Full Screen Slider thread. Stand by. 2 1 Link to comment Share on other sites More sharing options...
Share Posted March 18, 2020 @InTheOne I've updated the sliders and posted them in the original thread. Happy tweening. 5 Link to comment Share on other sites More sharing options...
Author Share Posted March 18, 2020 2 hours ago, PointC said: @InTheOne I've updated the sliders and posted them in the original thread. Thank You! I'll post my version which is going to be a simpler hero slider that is not full screen when I'm done. Much appreciated. 1 Link to comment Share on other sites More sharing options...
Share Posted March 19, 2020 Happy to help. Yes, please post back with your final result. I'd love to see it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now