Simple tweening engine for Unity
Add these dependencies to your manifest.json
{
"dependencies": {
"jd.boiv.in.tween": "https://github.com/starburst997/Unity.Tween.git",
"jd.boiv.in.extensions": "https://github.com/starburst997/Unity.Extensions.git",
"jd.boiv.in.text": "https://github.com/starburst997/Unity.Text.git"
}
}
You need to call the main loop once somewhere
private void Update()
{
Tweens.Instance.Update();
}
The library use extensions method to add tweening functionality
Rect.TweenAnchorPosX(200, 0.25f, Ease.QuadOut);
Check this webpage for visualizing them.
List of supported easing:
- Linear
- SineIn
- SineOut
- SineInOut
- SineOutIn
- QuadIn
- QuadOut
- QuadInOut
- QuadOutIn
- CubicIn
- CubicOut
- CubicInOut
- CubicOutIn
- QuartIn
- QuartOut
- QuartInOut
- QuartOutIn
- QuintIn
- QuintOut
- QuintInOut
- QuintOutIn
- ExpoIn
- ExpoOut
- ExpoInOut
- ExpoOutIn
- CircIn
- CircOut
- CircInOut
- CircOutIn
- BounceIn
- BounceOut
- BounceInOut
- BounceOutIn
- BackIn
- BackOut
- BackInOut
- BackOutIn
- ElasticIn
- ElasticOut
- ElasticInOut
- ElasticOutIn
- WarpIn
- WarpOut
- WarpInOut
- WarpOutIn
A sample project is also available.
- Add more examples
- Better readme