Jump to content


invalid easing tween value: [object Object] on simple tween

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

When doing a simple tween:


.set("#blueBox", {
  x: 200, y: 20, scale: 0.5
.to("#blueBox", 3, {
  scale: 1,
  easing: Power2.easeOut
I get these errors in the console:
invalid easing tween value: [object Object]
What causes this and how do I fix it?

See the Pen VYwMWv by killroy (@killroy) on CodePen

Link to comment
Share on other sites

Hi killroy  :)


pls fix this :

ease:Power2.easeOut // "easing" is wrong
  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

Could we improve that error message to include a stack trace and the invalid property name? This would make debugging things so much easier and more professional.

Link to comment
Share on other sites

Hmm, not quite sure what you mean. The error already states that easing was invalid.


invalid easing tween value: [object Object]


The only thing TweenMax knows is that the property you tried to alter on your target object doesn't exist.


You would get the same type of error. If you did

TweenLite.to("#blueBox", 3, {  scale: 1,
  hamburger: "with cheese"
Error: invalid hamburger tween value: [object Object] 


Does that help?


As for the stack trace, that is certainly something we can consider. Thanks for the suggestion.

  • Like 1
Link to comment
Share on other sites

I suggest perhaps putting the value in quotes "easing", because as it is it can also mean that I used the correct property but the wrong "easing" value for it ;) I'm temped to monkey patch, as it's an easy change, but it would be a pain to maintain. I guess you don't accept pull requests?

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.