Jump to content
Search Community

chailandau

Members
  • Posts

    21
  • Joined

  • Last visited

Posts posted by chailandau

  1. Hi there, I am trying to figure out how to make parallax images using SmoothScroller work with ScrollTrigger pinned items. Currently, the pinned items work great, and if I remove them, both parallax images work great. Currently, the first parallax image works at random times, but the second does not.

     

    I see it is being triggered at the wrong time due to the pinned items. I tried adding pinnedContainer to the ScrollSmoother, but that didn't work. Any ideas?

     

     

    See the Pen bGLWXdJ by chailandau (@chailandau) on CodePen

  2. This is a pretty specific question. I have a ScrollTrigger perspective animation running. It works perfectly. My issue is, I have some content that changes height depending on if the user clicks a certain button. ScrollTrigger refreshes, so that's not a problem. My problem is I want the animated item to end its animation at a certain hard point and remain fixed until the endTrigger. Right now its all based on the content height, which is changeable. 

     

    In this example, what I want to happen is:

    1. In default view, user scrolls to bottom of blue section and triangle is done its animation and then disappears.
    2. If user selects extra space, user scrolls to bottom of blue section. Checkmark finishes animation where it would have in the default view space. It stays fixed until user reaches end of sections and then disappears.

     

    It seems like I need to be able to define a stopping point for the animation and then separately a disappearing point. This would work in the 2 scenarios, because I want them both to stop at the same time, I just want it visible longer when there is extra space.

    See the Pen gOvmvoW?editors=1010 by chailandau (@chailandau) on CodePen

  3. Yes! I initially had a global timeline that paused and that was the exact behavior I want. For example if it's paused and you scroll, I don't want new lines coming in and I want the current line paused mid-draw if applicable. If it's unpaused and you scroll, I do want them coming in.

  4. Ah ok, thank you! I had it a part of a much bigger function and forgot I had originally set the DrawSVG values to 0, that fixed it :)

    Ok, so here you can see my actual problem. I want to be able to apply this DrawSVG affect in a ForEach loop, but I am having difficulties pausing it in one. I have a central pause button and I want to be able to just hit pause and access all of my instances in an array. I am having success adding an ID and pushing it to the array, but can't seem to figure out how to successfully pause. I tried using a timeline in the loop vs just a tween and didn't have much luck. It seems to sometimes pause once but then it won't play again, or similar issues where I can't get it consistent.

     

    I can't use the global timeline because on my project I am using ScrollSmoother and that pauses everything. What am I missing? I also tried adding it to a master timeline, but then all the animations seemed to play at once as opposed to using ScrollTrigger. 

    The behavior I want is similar to the global timeline where EVERYTHING pauses and then starts again based on the pause() and play() functions, but I want to be able to choose what it targets, hence the array.

     

    See the Pen dydNwVL?editors=1111 by chailandau (@chailandau) on CodePen

  5. I was trying to create a minimal demo for a different issue I'm having but I can't even seem to get the demo working. It works locally on my machine with a similar setup, so I'm not sure what's wrong. Once I solve this I can continue onto the original problem.

     

    The problem here is that I want to do a forEach loop and have all my SVG shapes draw in on scroll via ScrollTrigger, and its not working at all.

    See the Pen dydNwVL by chailandau (@chailandau) on CodePen

  6. I haven't been able to find this exact scenario. I know I'm missing something, I tried cobbling together some things I saw on the forums.

     

    Basically, I want the black box to be pinned as a fixed item via ScrollTrigger (that's why I have the trigger as the header, I just want it immediately pinned until I release it). 

     

    Because I'm using ScrollSmoother I can't seem to have the item in a fixed position without being outside of the container, but I need it inside.

     

    Any suggestions or directions to explore? Thanks.

    See the Pen mdXOEJQ by chailandau (@chailandau) on CodePen

  7. Hi, I am trying to implement ScrollSmoother on a whole page. I'm having issues because I want to smooth the same container that ScrollTrigger is using as a pin / pinContainer. Is this even possible? Desired behavior: smooth scroll whole page, pin the ScrollTrigger content correctly, continue smooth scrolling past it.

     

    I also can't seem to get ScrollSmoother working on the whole page at all, even without the pins - it just removes the scrollbar. This is a newer plugin so I haven't seen much about this particular issue.

    See the Pen gOvMyZo by chailandau (@chailandau) on CodePen

  8. I've been running into this issue with ScrollTrigger, where a single instance of my array works, but multiple do not.

     

     

    Here is one that works with only one instance:

    See the Pen ExQyyMJ by chailandau (@chailandau) on CodePen

     

    I've looked on the forums and not found anything that helped me, would love some insight!

     

    Multiple instances do not work:

    See the Pen LYQZZdK by chailandau (@chailandau) on CodePen

  9. Yes, I meant the left edge of the element to the left edge of the container. I do understand why that would be difficult. Would it help if the containers were pre-determined widths? The snapping functionality I am thinking of would work sort of like this:

    See the Pen LYVygxW by nrifki (@nrifki) on CodePen

     

    Is this possible using ScrollTrigger?

  10. Hello! I got horizontal scrolling working with ScrollTrigger. Is there a way to have it snap to each div? I tried inputting snap: "content-wrapper" but it just shot up to the page beginning when it hit it. I don't quite understand how snap works - I took it from one of the demos. I can't really find docs on it.

    See the Pen WNoeNMm by cliquechicago (@cliquechicago) on CodePen

  11. Thank you both for your responses! This makes a lot of sense, I should probably figure out the animation first and then add Scroll Trigger. @mikel your solution looks great - my question is, how do I arrange this with a div containing an image, a background image, plenty of text. I would show an example, but it's for a work training project and I don't think I can share my code. It's a three column layout with text on two sides and an image with a background image set behind it. Is that too much content for this effect?

×
×
  • Create New...