Jump to content
GreenSock

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

elegantseagulls last won the day on January 3 2020

elegantseagulls had the most liked content!

elegantseagulls

Moderators
  • Content Count

    307
  • Joined

  • Last visited

  • Days Won

    4

elegantseagulls last won the day on January 3 2020

elegantseagulls had the most liked content!

Community Reputation

646 Leader

About elegantseagulls

  • Rank
    Advanced Member

Contact Methods

Recent Profile Visitors

2,847 profile views
  1. Hi @David Jumbo, Do you have a CodePen that shows this behavior? It's impossible to debug something like this without seeing your code setup.
  2. Gah! I'm blaming lack of coffee for missing the 'All'.
  3. Hi @mimeartist, I could be wrong, but I believe GSAP uses document.querySelector(yourSelectors) (you'll want to look into how JS handles that to see what it's looking for first) to access elements. That said, the code you have isn't exact interchangeable either, as one represents the parent element and the other the child. The most efficient method would be just to target the ID, as that should be a unique-to-the-page identifier, or just a group of unique classes, if you are writing semantic HTML. There's a few things you could do to boost your GSAP code however: Move
  4. I'm confused as to why you wouldn't just make this a scrollable page, however this doesn't seem like a GSAP issue to me, as it's jumping on scroll end it seems. One way you could test would be to disable scrollmagic and just watch the GSAP tween. You might consider upgrading to the latest versions of GSAP and ScrollMagic to see if that fixes the issue, or perhaps see if you can file an issue on ScrollMagic's Github?
  5. I was looking at your example, and it's really difficult to see what's going on, or what the intended effect is. The only thing I'm seeing is the background change colors on load (I use Firefox). That said, looking at your code, I'm not seeing anything in your code that I'd expect to really bog down mobile browsers. However, tweening things like z-index may have strange results, and backgroundColor isn't hardware accelerated, so if you're tweening a lot of background colors at once, which seems like could be the case here, it may bog down some mobile browsers.
  6. @Ramesh Ramasamy, Also, I'm not seeing where you need jQuery, so you can probably drop that, too, unless you're using that elsewhere for functionality.
  7. Hi @dc65k, Generally if you're using the NPM install, it adds the ESM and UMD files for development purposes (depending on your needs) you should not be bundling the entire package for production (what you get in production will depend on what you import into your project, and how your production bundler sets things up. The NPM folder includes the plugin files that make development easier, and shouldn't be uploaded/referenced for production. This may help further clarify things: https://greensock.com/docs/v3/Installation
  8. I haven't done any jest testing for GSAP in React Hooks, but basically only use hooks for my animations. I've not found any significant performance issues, unless I'm trying to tween more than a few hundred elements at a time, on 'load/mount/callback/etc'.
  9. Hi @GO4ITJB First, it's difficult to debug this without a working example. Can you set up a CodePen so that we can help trouble shoot? Also, I'd highly recommend using the new GSAP3 Syntax (not TimelineMax/TweenMax). You can repeat individual tweens as well, so you could add repeat: -1 in your fromTo animations, but you'd just need to set a global time marker to set the start time on each of them, otherwise, you wouldn't get past the first one: ... .fromTo(cans[1], { opacity: 0 }, { opacity: 1, duration: 1, repeat: -1 }, 1} OR just run all of them as a single stagger animation .
  10. Without seeing a minimal demo, my guess is that something is causing the component to re-render, and if you aren't going proper garbage cleanup for that, you may run into issues.
  11. Hi @trompx , I've a fair bit if experience with this, but there's def a lot of gotchas along with it (this may warrant an article on the topic, which I need to find time to write). That said: To get started, I generally make a PageTransition Component and pass the route, timeout, (and page Y offset, depending on needs) in as a prop and have conditionals based on these props for animation actions, etc.
  12. More info here: https://greensock.com/docs/v3/Installation/?checked=core,drawSVG ... import { DrawSVGPlugin } from "gsap/dist/DrawSVGPlugin"; ... useEffect(() => { gsap.registerPlugin(DrawSVGPlugin); ... }, []);
  13. Hi @bipolab, The issue to me looks like a garbage cleanup issue. You'll want to kill your scrolltrigger instance, and tweens when you navigate to a new page.
  14. Hi @Saad Anjum, I think that you're over complicating this: You should just need to use stepped ease and no need for a for loop: https://greensock.com/docs/v3/Eases/SteppedEase
  15. When you use a function with () in your onComplete (foo('test'))it will fire right away. You'll want to use onCompleteParams to add your parameters. gsap.to('div', { x: 120, duration: 4, rotation: 270, onComplete: foo, onCompleteParams: ['test'], stagger: .2 }) function foo(val) { console.log(val); }
×