Jump to content
Search Community

Tween not easing with ScrollMagic in React

jaacked test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi everyone!

 

I'm trying to ease a progress bar filling animation but when it gets triggered it jumps straight to 100%. I want the animation to be triggered only once. I'm using react-scrollmagic and react-gsap. Progress bar is from Bulma framework.

This is my code:

<Controller>
<Scene
    pin={false}
    reverse={false}
    indicators={true}
    triggerElement= "#trigger1"
    duration={0}
>
        <Tween staggerFrom={{ value: 0, ease: 'Expo.easeOut' }} staggerTo={{ value: 100, ease: 'Expo.easeOut' }} stagger={0.15}>
            <div id="trigger1"></div>
            <progress className="progress is-primary" value="0" max="100"></progress>
        </Tween>
        </Scene>
</Controller>

The same tween without the scrollmagic scene instead works perfectly.

 

Any ideas how to fix this?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...