Jump to content
Search Community

Easing Function Not Displaying

Susan 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

I didn't see any problem. Did you mean Linear.easeNone? Also, it looks like you've got a commented-out tween that animates the "top" using the default ease (Power1.easeOut), so maybe that's what's confusing you. "y" and "top" both affect the element's vertical position and you've got two different eases at play. See what I mean? 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Hi GreenSock,

 

Thank you so much for pointing out my negligence, I have missed out he opacity value!

 

Another question, TweenMax allows id to have no # beside the name? As you can see below, I did not include the # but the id is rendered together with the code.

 

TweenMax.to(light, 2.5, { opacity: 0.5, ease: Power0.easeOut, y: -50, repeat: -1 });

 

Kindly advise, thank you.

Link to comment
Share on other sites

Interesting. It happens because 'named elements' (elements that have id or name) are added to document object as properties, that's why it works. But in general you should stick to writing string as '#light', it saves you from potential conflict issues where you might use variable with same name as id.

 

If that's confusing you, using light works in most browsers but I will suggest to practice using '#light'.

 

Here you can read more if you are interested.

  • Like 3
  • Thanks 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...