Jump to content
GreenSock

cereal_beast

FOUC not working properly

Go to solution Solved by noviedo,

Recommended Posts

Im having an issue with the FOUC, I've set the opacity to 0, and autoAlpha to 1 but the animation plays briefly and then disappears? Any idea why thats happening?

See the Pen MWVYNdR by gjjr (@gjjr) on CodePen

Link to comment
Share on other sites

  • Solution

Hey @cereal_beast, how's going?

You are using a .from() function, so in this way, you will never get the correct autoAlpha because you are set the opacity in 0, probably you will need to use a .to() function to trigger the opacity. I did a quick fork from your pen and fixed it, just check it.
 

I fixed your syntaxis regarding the duration position, and also I split the animation into two tweens, a from() function for all properties and just a to() function to the autoAlpha. With the last parameter in the to() tween ('<') we reach to execute both tweens at the same time.

I hope helps you!
 

See the Pen mdxJdad by nazarenooviedo (@nazarenooviedo) on CodePen

  • Like 2
Link to comment
Share on other sites

Amazing thank you for explaining your edits also!

  • 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.
×