Jump to content

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

PointC last won the day on May 20

PointC had the most liked content!


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by PointC

  1. I don't know a whole lot about jQuery, but removing the function wrapping everything seems to fix the problem. I'm not sure what that's doing since you already have DOMContentLoaded and load event listeners. Your pen also wasn't loading GSAP or any of the necessary plugins. https://codepen.io/PointC/pen/BaYdwNB/c433123cfd2b3fc5db165402a6100992
  2. I'd echo Jack and Cassie's thoughts from above. Definitely a nice idea @Eunomiac, but I wouldn't want to see a bunch of unanswered logic questions. There are active community members answering questions around here, but by and large, most are answered by Admins/Mods so I'm not sure many people would jump on the 3rd party, logic type questions. Most of us on the GSAP team wouldn't really have time either. That's pretty much the main problem. We're all trying to get all the GSAP related questions answered so diving deep into other code is a bit of a stretch. Most of the Mods are volunteers and have full-time jobs too so it's a balancing act. That's some of the best advice you can get. Helping others is how I learned GSAP and probably 50%+ of what I know about vanilla JS. You'd be amazed how much you'll learn just by answering some questions. You might make a few mistakes (I made many), but that's how we learn. All the best and happy tweening to everyone.
  3. Sure, you can start from a central point. For that you'd want to animate the cx/cy attributes of each circle. I just hard coded the values in my fork, but there are other ways to get the correct position too. Here's a fork with that update. https://codepen.io/PointC/pen/MWQvmmo/524ac72daf0762b035d3f47cccc5d427 A couple other notes. I added all the tweens to a timeline. That way you don't need the delay on any of them and the bowl fade-in will happen after the marbles finish their animation. The opacity tween isn't doing anything here. When you use a from tween, that is saying "hey, animate from this position/opacity to my current position/ opacity". Since the opacity is already 1, from 1 → 1 won't actually show anything. I changed it to from 0 in my fork so you could see the difference. Hopefully that helps. Happy tweening.
  4. I don't know anything about React, but it seems there has been an issue (especially with from tweens) with React 18 and strict mode. Maybe this thread can help.
  5. Great - glad to hear it was something simple. Happy tweening and thanks for being a Club member.
  6. You can also use percentages: gsap.fromTo( "#masker", { drawSVG: "0% 0%" }, { drawSVG: "0% 100%", duration: 3 } );
  7. I used a from() tween in my fork of your demo. Did you happen to switch it to a .to() tween? Then it would animate from 100% → 0.
  8. And a fork of your pen with that change. https://codepen.io/PointC/pen/OJQgZdK Happy tweening.
  9. Hi @nickraps You'll need to use a mask for that. I have a whole tutorial about it here: https://www.motiontricks.com/svg-dashed-line-animation/ One of the demos from the tutorial. https://codepen.io/PointC/pen/WNrvjEy/1ecacafb5c4579ea20c360a6ac8f070c Happy tweening.
  10. Just to clarify. I don't want to discourage you from trying wild and crazy things. Go for it. I've just seen a lot of people try complicated animations right out of the gate and then get frustrated when things don't 'click' and abandon GSAP altogether. We want to encourage everyone in the community to stick with it and we're here to help with any and all GSAP related questions and problems. Happy tweening.
  11. Hi @aaron4osu Welcome to the forum. If this project is a bit overwhelming, I'd suggest going to the Learning Center and starting a bit smaller. That being said, you'd want to use a timeline and stagger to achieve the emptying of each bowl. Here's a quick fork showing what I mean. https://codepen.io/PointC/pen/YzeQEdx/5a996bf1d6d02a00fd9215ea71bab039 Obviously the images are not hitting the target correctly (as you noted). That will mainly be a CSS issue. If you want to use divs like that, you'll need to make some calculations about how far away the middle bowl is and listen for resize events. Another option would be to place all of the elements in an SVG and then everything scales together so you can use hard coded values. If you want the final product to look exactly like the filled bowl, you may want to work backwards and use .from() tweens. Lots of options are possible, but as I mentioned, you may want to start with something a little easier after you've gone through the Learning Center. Happy tweening.
  12. Some other examples. https://codepen.io/PointC/pen/XWXvpBd https://codepen.io/PointC/pen/pydXLG Tutorials. https://www.motiontricks.com/svg-masks-and-clippaths/ https://www.motiontricks.com/invert-svg-text-with-a-mask/ Happy tweening.
  13. Thanks for the demo. My advice from above would stand. I'd probably just use a .fromTo() tween in that ScrollTrigger timeline. I'd also recommend scaling the text element rather than the whole container. You can see horizontal scrollbars appear when you scale the whole thing. Just my two cents. YMMV Happy tweening.
  14. Hi @willdzoan31 Welcome to the forum. You are correct. That jump is because of the first tween. Some solutions: Create your ScrollTrigger in a function that is called when the first tween completes. Wrap your target in another element and scale that one in the ST tween. Use a fromTo for the ScrollTrigger tween (1 → 4) That's my best advice without actually seeing the code in context with a minimal demo. Happy tweening
  15. Just to throw my two cents out there - some CodePen accounts to bookmark and/or follow. Talented coders that feature a ton of GSAP: Cassie Evans: https://codepen.io/cassie-codes Blake Bowen: https://codepen.io/osublake Carl Schooff: https://codepen.io/snorkltv Pete Barr: https://codepen.io/petebarr Steve Gardner: https://codepen.io/ste-vg Ryan Mulligan: https://codepen.io/hexagoncircle Tom Miller: https://codepen.io/creativeocean Chris Gannon: https://codepen.io/chrisgannon Darin Senneff: https://codepen.io/dsenneff Craig Roblewsky: https://codepen.io/PointC/ (this guy is awesome 🤣) It may not be exactly what you need, but there should some good inspiration in those accounts. Happy tweening.
  16. There are a few problems here. Your trigger element (.hp-360) doesn't exist There are several elements with CSS transitions Your start and end are both set to "35% 70%", but you have scrub set to true If you decide which element should be the trigger and remove the CSS transitions on everything GSAP will be animating, I think you'll be good to go. Happy tweening.
  17. Hi @Tanvi_Patel Welcome to the forum. The moving background is a series of seamless repeating SVGs. Here's a thread with seamless clouds using the same technique. The animated stag is a sprite sheet. That should get you pointed in the right direction. Also be sure to visit the Learning Center to help you get started. Happy tweening.
  18. Welcome to the forum @antomopozzap. You've marked this as solved. So, you don't need any further help? If you do, providing a minimal demo will get you the best answers. Happy tweening.
  19. I see some flicker in most browsers as the text comes to a stop. You can try the usual tricks - slight rotation or maybe will-change. I'd also recommend using ScrollSmoother rather than Locomotive. https://greensock.com/scrollsmoother/
  20. Correct - the duration of a tween doesn't make much difference with scrub. It's all about ratios. Two 1 second tweens on a scrub timeline will be the same as two 10 second tweens on a timeline. (Each taking up 50% of the scroll distance) However, changing just one of them to 10 seconds will make a big difference. Now, the 1 second tween is only taking up approximately 9% of the scroll distance while the 10 second one is take up approximately 91% because we have a total of 11 seconds. My personal preference is to use linear eases on scrub tweens/timelines, but yes you can certainly use a custom ease on a scrub tween if that's your preference. I'd say just give it a try and see what what works. Happy tweening.
  21. I don't think there's anything wrong with the way you did it and a few extra ScrollTriggers aren't going to make a noticeable difference. Jack is a performance connoisseur so I trust GSAP and don't get too wrapped up in all things performance until I notice something chugging along. That's almost always going to be a rendering issue though. The yoyo tween I posted above will have a brief period of time with nothing changing. That's why there is a repeat delay. Say you have the above code with a 1 second tween duration and a 2 second repeat delay. That's a total of 4 seconds. So, the first 25% of the scrub will be the tween to full opacity. 25% → 75% of the scrub is nothing as that is the delay. Then 75% → 100% would be the fade back to the original opacity. Make sense? Happy tweening.
  22. Are you asking the same thing as your other thread here?
  23. If you want the opacity to fade in on each repeat, you'd need to add it to the smoke timeline. Right now you have it in the setTimeout function. Why not just make it part of the main smoke timeline?
  24. I'm pretty sure killTweensOf will indeed kill the associated ScrollTrigger. Though, any ScrollTriggers associated with timelines will remain. It's easy enough to kill all the ScrollTriggers if needed. ScrollTrigger.getAll().forEach((t) => { t.kill(); }); Happy tweening.