Jump to content
Search Community

Append to TweenLite properties

thrasherstudios77 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

Hi

 

I need someway using TweenLite to add tween properties after the tween has been created, not during an animation but in a different method. Before to achieve this I was utilizing TweenMax.updateTo() method, but now I need to achieve the same thing but with TweenLite.

 

Here is the working code using TweenMax. 

openMenu: function(e) {
   this.containerTween = new TweenLite.to(this.container, this.duration, {
      force3D: true,
      ease: this.ease,
   });
   this.addFX('in', this.fxType);
}

addFX: function(transition, type) {
   switch (type) {
      case '3d-rotate-in':
          if (transition == "in") {
             this.containerTween.updateTo({ css:{ x:this.sidebar.innerWidth() } });
          }
   }
}

Is there a way with TweenLite in the addFX() method to append to the tween properties for this.containerTween?

Link to comment
Share on other sites

Sorry, updateTo() is only available in TweenMax. 

The API does not currently support adding properties to a TweenLite tween after it has been created.

 

The only options I see now are:

  1. use TweenMax
  2. don't create your tween until you know the properties it should be tweening

I imagine these options were clear to you prior to posting, but there really isn't any other option I can think of.

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