Jump to content
Search Community

Change speed opacity

staixe test
Moderator Tag

Recommended Posts

Hello!

Sorry for my English.

I use ScrollMagic with Gsap, 

 var ol = TimelineMax.fromTo('.layer2, .layer4', 6, {
            width: '100%',
            right: '30%',
            bottom: '-10%',
        },
        {
            bottom: 0,
            right: 0,
            opacity: 1,
            width: '50%',
            transformOrigin: 'right bottom',
        }, "-=6"
    )

opacity at the beginning = 0, then at the end = 1, how can I change the opacity 2 seconds after the start of the animation or change it in increments of 0.3?

Link to comment
Share on other sites

Hey staixe and welcome to the GreenSock forums!

 

13 minutes ago, staixe said:

how can I change the opacity 2 seconds after the start of the animation

Use multiple tweens:

tl.fromTo('.layer2, .layer4', {
  width: '100%',
  right: '30%',
  bottom: '-10%',
}, {
  duration: 6,
  bottom: 0,
  right: 0,
  width: '50%',
  transformOrigin: 'right bottom',
})
.to('.layer2, .layer4', {opacity: 1}, 2)

 

13 minutes ago, staixe said:

or change it in increments of 0.3?

Same sort of thing but with sequenced tweens.

 

More resources:

 

  • Like 1
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...