Skip to content

Conversation

@WesleyE
Copy link

@WesleyE WesleyE commented Sep 19, 2013

  • Cleaned code by reformatting
  • Added deactivateOnComplete option (bool)
  • Added destroyOnComplete option (bool)
  • Added the possibility of adding different out and in eases
  • Added alpha blending on multiple materials
  • Fixed easeInOutBack being easeInOutElastic

- Cleaned code by reformatting
- Fixed easeInOutBack being easeInOutElastic
- Added the possibility of adding different out and in eases
- Fixed easing not working
- Added alpha blending on multiple materials
@dentedpixel
Copy link
Owner

Hey Wesley, Thanks for your additions. I do not quite understand the use of Flags and the HasFlag function. Was this added to correct any sort of problem? I am worried all of these calls to this method will slow things down, so I want to understand the purpose of it.

Thanks!

@WesleyE
Copy link
Author

WesleyE commented Sep 19, 2013

Hi man, the flags are there to be able to select multiple types of easing for the in and out, like so:

LeanTweenType ease = LeanTweenType.easeInQuad | LeanTweenType.easeOutBounce;

The HasFlag basically does a bitwise operation check which flag is selected, it may be a very, very tiny bit slower, you might not even notice it as these kind of operations are mostly done in one cpu cycle anyways. It basically is the same as your implementation, with the exeption of the values being in power of 2 to be able to seperate the flags later on with a inclusive or.
The inclusive or returns the bits that are either in var a or in var b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants