Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

PointC last won the day on May 15

PointC had the most liked content!

PointC

Moderators
  • Posts

    4,822
  • Joined

  • Last visited

  • Days Won

    390

Everything posted by PointC

  1. Hi @ApriSix Welcome to the forum. You're not actually playing that timeline with the play button. You're just calling the function that returns the timeline which is not in a paused state so it immediately plays. I'd recommend assigning that returned timeline to a variable and then you can control it with all the available methods. Something like this: https://codepen.io/PointC/pen/rNJWrjy/9a55e829614b45f31e20adf3e04957bd Hopefully that helps. Happy tweening and welcome aboard.
  2. Yep - in this case it's not a simple matter of refreshing ScrollTrigger because the number of targets is changing. On wide screens you'll only have a few lines and triggers, but on small screens you may have 10 or more. So you'd want to loop through and kill the ScrollTriggers when you revert the text. Then re-split and re-add your ScrollTriggers. Make sense?
  3. Yeah - looks like they just have a resize listener and re-split. You can see on wide screens there are 4 divs for the lines and that jumps to seven as you shrink the viewport. They also drop the font size a bit for mobile. Best of luck.
  4. Resizing can be a bit tricky with lines and a fixed font size. I used 10vw for a font size in my fork of your demo and it seems to work just fine. Another option is to use a resize listener to revert the text and re-split when the user has finished resizing. Happy tweening.
  5. This thread may help. We discussed using media queries to change the data speed/lag to new values by looping through and killing the old ScrollTriggers.
  6. Happy to help. Thanks for your Club membership. We appreciate the support. Yep - it's a phenomenal community. I wouldn't know much of anything about JavaScript and GSAP had I not started hanging out here. I found the best way to learn was to try and help other users and answer questions. You'd be surprised how much you pick up just by trying to figure out someone's code problem. Have fun and happy tweening.
  7. Split your text into lines, loop through those targets and create a ScrollTrigger for each one. Boom - you're good to go. Happy tweening. https://codepen.io/PointC/pen/qBxaJyX/3e64dc369cd5e8a71235b7d123180339
  8. PointC

    Hello Team

    Yeah, that's one of my demos from this thread: The first line is masked. The second one is animating the strokeDasharray. As @Cassie mentioned, they seem to work fine, so maybe you could put together a minimal demo of what you're attempting. Happy tweening.
  9. That link seems to go to a site where a username and password are required. It'll be best if you can put it into a minimal demo anyway. It doesn't need to be your real project. Just a few colored divs to show the problem. Some things to check. Have you loaded and registered the ScrollTo plugin? Are you using the latest version of GSAP and all plugins? Do you have any conflicting CSS transitions? If you could add a simple demo, I'm sure we can help you solve the problem. Thanks.
  10. I think you're describing a case of FOUC. Check this out.
  11. Looks like just a typo in those two stagger objects. anount: 2 // just a typo amount: 2 Happy tweening.
  12. I've always used the ALT drag through the lines for individual line comments on the CSS.
  13. ahhh... that makes perfect sense. I just never want to assume something simple is common knowledge. I had an employee once who was typing out the <!-- --> around his HTML. He nearly fainted when I showed him the shortcut.
  14. I'm sure you know the comment shortcut of CTRL or Command + /, right? (Same for SCSS, JS, CSS, HTML) Thought I'd mention it just in case.
  15. Do you have a new demo using ScrollTrigger? Thanks.
  16. If you're not animating the element to a new height, ResizeObserver should work just fine. I was just referring to your first demo that was firing constantly on window resize and then calling refresh multiple times. Probably not what you want. But yeah, seems like it's working fine with what you have now - so go for it. Sorry, I'm just not following the question. Maybe you could reduce the demo a bit to something super simple.
  17. I don't think you want to call refresh on resize as ScrollTrigger will do that automatically. I was referring to a manual change in the height of an element via click or some other interaction. Or maybe you add elements to the DOM. In those cases, you'd want to call refresh. I'm not quite following your demo and what is supposed to be happening so I made a quick example for you. Here are just a few divs, a spinning target div triggered by ScrollTrigger and an expanding content area. Notice how the tween that expands/closes the content box calls refresh when the tween completes? See how the markers change each time that happens? That's generally when you want to manually call refresh - when something has changed in the DOM to cause a reflow. https://codepen.io/PointC/pen/JjpYwBO Hopefully that makes sense. Happy tweening.
  18. Hi @coderesolution You'll need to call ScrollTrigger.refresh(). https://greensock.com/docs/v3/Plugins/ScrollTrigger/static.refresh() ScrollSmoother doesn't have its own refresh method. (yet) Happy tweening.
  19. Hi @Jack7cz Welcome to the forum. It sounds like you're looking for the ScrollTrigger.refresh() method. https://greensock.com/docs/v3/Plugins/ScrollTrigger/static.refresh() Happy tweening and welcome aboard.
  20. Shouldn't be any problems with that setup. The installation guide should help. https://greensock.com/docs/v3/Installation Happy tweening.
  21. Happy to help. Please post back when you finish the project. I'd love to see it.
  22. Hi @coderesolution Welcome to the forum and thanks for being a Club member. We appreciate it. Could you put that into a minimal demo for us please? We'd be happy to take look and get you pointed in the right direction. You can also double check that you're using the latest versions of GSAP and the plugins. Happy tweening and welcome aboard.
  23. I'm not sure I follow the question. Do you mean you want the "Hello" and "World" boxes to land perfectly centered on the "Random Text" box? https://codepen.io/PointC/pen/VwQvvXb/a50267e21cfa1e8397e995a7c19ba96f Is that what you meant?
  24. Hi @binarybhu Welcome to the forum. I think that would be a whole lot easier with DrawSVG rather than a morph since it's a primitive circle. https://codepen.io/PointC/pen/PoQPPmO/03283c34b0c95fb24f0cfa8c11cfb575 MorphSVG and DrawSVG are perks of Club GreenSock so you'd need a membership to use them in the wild. Hopefully that helps. Happy tweening and welcome aboard.
×