Jump to content
GreenSock

karld

setters getters (e.g. setX, getX) detection is broken?

Moderator Tag

Recommended Posts

I used the auto-detection of getters and setters to tween certain numbers, which I got the idea to do from this forum post 

 

 

However, this no longer seems to work in GSAP 3. Any ideas?

Broken in GSAP 3:

 

Working in GSAP2:

See the Pen jOORZbM by karldougie (@karldougie) on CodePen

See the Pen vYYMdEb by karldougie (@karldougie) on CodePen

Link to comment
Share on other sites

Yep, here's another option (same general idea): 

See the Pen 64913f1ea7154fe340abf33e7e3861e5?editors=0010 by GreenSock (@GreenSock) on CodePen

 

The whole thing about methods that start with the word "get" or "set" seemed kinda old-school and I didn't think it was worthy of taking up kb in GSAP 3 since you could so easily accomplish it in other ways. Sorry if any of that was confusing. 

  • Like 2
Link to comment
Share on other sites

@GreenSock I think it is great to move towards standard javascript syntax, and I'm really happy with the reduced size of GSAP! 

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