Jump to content
GreenSock

Freehand Sam

ShockinglyGreen
  • Posts

    16
  • Joined

  • Last visited

About Freehand Sam

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Freehand Sam's Achievements

  1. Thanks. I think this is above my head. If I have time I'll come back to it and play around with the above suggestion. I appreciate your guidance.
  2. Thanks. Right, I assume I'm going to have to animate each slide separately instead of one long timeline that just animates the height of all three combined for starters. But I'm not even clear from there if it's possible to get a slide to stick and hold in place for a sec before animating in the next slide.
  3. What I'm trying to achieve is the effect of the individual slides (.number-slides) scrolling up very quickly, then locking and holding for a second, then releasing to quickly scroll to the next. The client wants it to feel more like each slide is "clicking" into place, as opposed to the smooth scroll. Essentially like a vertical carousel slider, but it's controlled via scroll. And pinned while it runs through the 3 slides.
  4. Okay, I now realize I was completely misunderstanding pinning and this cleared it up for me so well. And I'll do some reading to understand stagger now too. Thank you very much.
  5. Funnily enough, the Codepen happens to be at the right height that you don't see the issue. You have to view it on Codepen or change it to 0.5x to see what I mean about the whitespace above and below the gallery section...
  6. I'm struggling with a couple things on what I'm sure is a really simple (for someone else) scrolltrigger. I've read the documentation and reviewed examples, but I can't seem to wrap my head around what's creating my issue here. I want to explicitly set my gallery to be 420px tall. And so I'd like it to pin at center center, scroll up the three slides, then continue. But I can't seem to figure out how you keep the pinned area to just be 420px with no whitespace above and below. When I've used pinning before, it was always 100vh, and this wasn't an issue. I'm guessing it has to do with my "end:" parameter, but reducing that to "+=420" (height of one slide) just makes the scroll duration quicker. I like the speed of it, I just don't want any spacing above and below. Then secondly, I need to make the indicators have an active state, or just change background colors as each slide comes into view. I've not spent time on this yet, and my pen doesn't even address it. I wanted to figure out the major issue first. But any examples you could point me to, or advice on the logic to use, would be appreciated. Not sure if I should be thinking of it as "if the scroll travels 1/(number of slides) of the distance, change color" or more like "on enter", "on leave" foreach slide type of thing. Thanks as always for your great help.
  7. FWIW, my issue turned out to be a big, complicated SVG US map graphic. It is pretty intense - all 50 of the US states with individual paths, plus state labels as paths plus I drop in about 350 location markers, all SVGs too. So as Jack mentioned in #4, the SVG was too much math to animate smoothly. Since I couldn't lose or change the map (it has to be an SVG to do what it needs to do), I decided to display:none it when it's not in view. So, we're a bit choppy in the map section, but smooth everywhere above and below it on the page. If you're doing something like this, make sure you have a container that holds the space (using aspect ratio for example) so there's no jump when display:none kicks in. I also ended up using ScrollTrigger.clearScrollMemory(); window.history.scrollRestoration = "manual"; because I realized my map wasn't initializing if I refreshed the page after I'd scrolled past it -- since its container didn't exist. Thanks again for the super helpful community here.
  8. I really appreciate you taking the time. I'll do some one by one testing and try to report back on which made the biggest difference for others' future reference.
  9. Just curious if anyone is aware of an article(s) or resource I can refer to for best practices to achieve the smoothest experience possible when combining multiple GSAP effects and ScrollSmoother. My first site has the GSAP kitchen sink and is surprisingly fairly smooth on Chrome considering how many effects are happening, but it's a bit jittery on Safari. So just looking for any tips/tricks to make it as good as it can be for all users. Things like adding "will-change: transform" to elements that will be transformed. I'm aware of this css-tricks article: https://css-tricks.com/tips-for-writing-animation-code-efficiently/ and think I've followed the principles pretty well. Anything else out there recommended reading on this subject? Thanks!
  10. Yes, it is. I rebuilt it using that logic and it's much easier for me to understand now. For whatever reason, I did have to go back and add the bit about z-indexing from the original to keep my last photo from being on top - I'm sure that's related to some parent positioning or z-indexing I already had going on in my site's stylesheets. I also had to set PinSpacing: 'false' otherwise there was a huge space below (bc .text-wrap is 300vh I assume). Again, probably some difference in overflow in my site vs the Pen. But this definitely got me there. Thanks again, guys.
  11. Thanks, @OSUblake. You were right. I forgot about scrolling and jut did the reveal animations for when each text panel was visible and it worked on my first shot. So that did it for the left side. Then in regard to my issue with ScrollSmooth, it was a simple as removing "scroller:" parameter from the triggers. Which, obviously, I should have figured out on my own, but am thankful for @akapowl's direction. All set. Thanks again for the great community here.
  12. I know there are a million posts about this cuberto.com effect, but I can't find anyone that has combined the effect akapowl ultimately achieves here: https://codepen.io/akapowl/pen/bGpxpmJ/71b0d3b98ebd526c8abf2bb4b70ac702 but swapping out Scrollbar for the ScrollSmoother plugin. I had this basically working with no scrolling library prior to adding ScrollSmoother by wrapping the whole section in a .scroller div that had overflow-y:scroll and a set height of 300vh, since I have 3 section of 100vh each. But then adding ScrollSmoother broke that, understandably - since it's not going to scroll that internal div. So then I tried changing my "scroller" parameter in my ScrollTriggers to use the #smooth-content div, closer to what the Scrollbar demo does, but to no avail. Ultimately, I'd like it to scroll down to the gallery (#values) section, pin, and then reveal each of the three images on the right based on the scrub position. But then also slide up the text corresponding text as its section comes into view. I was going to tackle the text part once I got the images going, but any direction as to how to trigger those properly would be greatly appreciated too. I'll probably end up right back here asking anyway. I'm obviously new to this. I'm very grateful for the extremely helpful community here. I've only been playing with GSAP for a week now and it's starting to gel, but unfortunately my client is pushing me into the deep end right off the bat, so I'm humbly asking for assistance.
  13. Solved. Thanks so much. That's what I get for copying/pasting code without reading each part and thinking it all through. I might have one more for you, but I'l create a separate Pen and topic for it if I can't solve it on my own.
  14. Hi. I'm just starting to experiment with ScrollSmoother and found that is created an issue on a previously created horizontal scroll gallery I made with ScrollTrigger. If you look at the CodePen, you'll see it correctly scrolls to the gallery, pins it and starts to horizontally scroll the first strip of photos right to left, although it never makes it to the 4th photo. And then sort of stops moving anything... What's supposed to happen after scrolling all 4 photos is unpinning that first strip of photos, scroll down to the next strip, and do the horizontal scroll again, and so on. Then eventually release and continue vertical scrolling to the bottom of the page. If you comment out the ScrollSmoother.create(), you'll see how it is supposed to work. So I know my issue is introduced by ScrollSmoother, but I'm not sure where to go next to try to solve it. I tried making my scroll wrappers above the #portfolio section ONLY, but even still I had the issue. I'm new to GSAP in general, and sure I'm missing something. I just can't find the appropriate advice in the forum or docs. Any guidance is much appreciated.
×