Jump to content
Search Community

[FEATURE REQUEST] Per-property control

dalisoft 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'm today trying to get something, but i'm failed. I did own javascript animation platform, that can do part of thing of GSAP!

But i need "In-Sync" tweening, basic users don't need that, but for sliders, tab-changed, Timeline GSAP script is best working. Missing some feature i need.

TweenMax.to('#element', 1, { width : 200, height : 200, x : 100, ease : { width : 'QuadInOut', height : 'ExpoInOut' }});
// these syntax is for example, maybe have wrong syntax, sorry 

I can create this plug-in (pls let me read useful docs for creating plugin) and have already?

It's reduces memory, CPU and size too.

 

Thanks,

 

Any reply appreicate.

 

Sorry for english ;)

Link to comment
Share on other sites

Sorry, we don't offer different easing for different properties inside the same tween. There are two reasons for that:

  1. Performance. The rendering loop is probably the single most important thing to optimize and the ease is an essential part of that. Being able to calculate the ease ratio once and use it for all the properties makes things very efficient. If we were to offer individual tweening, we would lose the ability to optimize that way which in my opinion would be a big loss. GSAP places a HUGE priority on performance, as you know. 
  2. API complexity

You're welcome to build a plugin if you want, but that plugin would have to do a lot of work quite frankly, as it'd need to kill off all the other property tweens so that it could handle them all internally (in the plugin). For example, if that tween is handling x, y, width, and height, then you'd need to have the plugin kill all of those in the parent tween, and then create and manage them inside the plugin. I really think it's a much better idea to just create a separate tween for properties that need to be eased differently. 

  • Like 3
Link to comment
Share on other sites

Sorry, we don't offer different easing for different properties inside the same tween. There are two reasons for that:

  1. Performance. The rendering loop is probably the single most important thing to optimize and the ease is an essential part of that. Being able to calculate the ease ratio once and use it for all the properties makes things very efficient. If we were to offer individual tweening, we would lose the ability to optimize that way which in my opinion would be a big loss. GSAP places a HUGE priority on performance, as you know. 
  2. API complexity

You're welcome to build a plugin if you want, but that plugin would have to do a lot of work quite frankly, as it'd need to kill off all the other property tweens so that it could handle them all internally (in the plugin). For example, if that tween is handling x, y, width, and height, then you'd need to have the plugin kill all of those in the parent tween, and then create and manage them inside the plugin. I really think it's a much better idea to just create a separate tween for properties that need to be eased differently. 

I like your keeping code light and more useful, thanks for reply. I try to make it's, so i need powerful animation engine. You're best coder of javascript/AS. Thanks again.

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