tag | 3d59d5dfa98088d3c1846f83b6fa3f3a6832ff53 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Thu Jan 04 16:56:08 2024 -0800 |
object | 8902066f0ab086c4576182314a6ddb0fb1f2a3be |
frc_340819010 (10586669,com.google.android.adbd,com.google.android.adservices,com.google.android.appsearch,com.google.android.captiveportallogin,com.google.android.configinfrastructure,com.google.android.conscrypt,com.google.android.documentsui,com.google.android.ext.services,com.google.android.extservices,com.google.android.go.adbd,com.google.android.go.adservices,com.google.android.go.appsearch,com.google.android.go.captiveportallogin,com.google.android.go.configinfrastructure,com.google.android.go.conscrypt,com.google.android.go.documentsui,com.google.android.go.extservices,com.google.android.go.ipsec,com.google.android.go.mediaprovider,com.google.android.go.networkstack,com.google.android.go.neuralnetworks,com.google.android.go.ondevicepersonalization,com.google.android.go.os.statsd,com.google.android.go.resolv,com.google.android.go.rkpd,com.google.android.go.scheduling,com.google.android.go.sdkext,com.google.android.go.tethering,com.google.android.go.tzdata5,com.google.android.go.uwb,com.google.android.go.wifi,com.google.android.ipsec,com.google.android.networkstack,com.google.android.neuralnetworks,com.google.android.ondevicepersonalization,com.google.android.os.statsd,com.google.android.resolv,com.google.android.rkpd,com.google.android.scheduling,com.google.android.sdkext,com.google.android.tethering,com.google.android.tzdata5,com.google.android.uwb,com.google.android.wifi)
commit | 8902066f0ab086c4576182314a6ddb0fb1f2a3be | [log] [tgz] |
---|---|---|
author | Bob Badour <bbadour@google.com> | Sat May 29 14:36:41 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Sat May 29 14:36:41 2021 +0000 |
tree | 0763d65507beb65700f1fdbcce31313a4e60d713 | |
parent | 498dea51baeeafc3505ce934509e38ef3c3647a5 [diff] | |
parent | 88bd3e34241878e3cca2a76aeccea9d48d061c0e [diff] |
[LSC] Add LOCAL_LICENSE_KINDS to external/universal-tween-engine am: e35f88c0e9 am: 1939c1b32f am: e9d0a2a78e am: c148359374 am: 88bd3e3424 Original change: https://android-review.googlesource.com/c/platform/external/universal-tween-engine/+/1588585 Change-Id: Ifb5466ff8de46516e1cf53e3b007110413ba624a
The Universal Tween Engine enables the interpolation of every attribute from any object in any Java project (being Swing, SWT, OpenGL or even Console-based). Implement the TweenAccessor interface, register it to the engine, and animate anything you want!
In one line, send your objects to another position (here x=20 and y=30), with a smooth elastic transition, during 1 second).
// Arguments are (1) the target, (2) the type of interpolation, // and (3) the duration in seconds. Additional methods specify // the target values, and the easing function. Tween.to(mySprite, Type.POSITION_XY, 1.0f).target(20, 30).ease(Elastic.INOUT); // Possibilities are: Tween.to(...); // interpolates from the current values to the targets Tween.from(...); // interpolates from the given values to the current ones Tween.set(...); // apply the target values without animation (useful with a delay) Tween.call(...); // calls a method (useful with a delay) // Current options are: myTween.delay(0.5f); myTween.repeat(2, 0.5f); myTween.repeatYoyo(2, 0.5f); myTween.pause(); myTween.resume(); myTween.setCallback(callback); myTween.setCallbackTriggers(flags); myTween.setUserData(obj); // You can of course chain everything: Tween.to(...).delay(1.0f).repeat(2, 0.5f).start(myManager); // Moreover, slow-motion, fast-motion and reverse play is easy, // you just need to change the speed of the update: myManager.update(delta * speed);
Create some powerful animation sequences!
Timeline.createSequence() // First, set all objects to their initial positions .push(Tween.set(...)) .push(Tween.set(...)) .push(Tween.set(...)) // Wait 1s .pushPause(1.0f) // Move the objects around, one after the other .push(Tween.to(...)) .push(Tween.to(...)) .push(Tween.to(...)) // Then, move the objects around at the same time .beginParallel() .push(Tween.to(...)) .push(Tween.to(...)) .push(Tween.to(...)) .end() // And repeat the whole sequence 2 times // with a 0.5s pause between each iteration .repeatYoyo(2, 0.5f) // Let's go! .start(myManager);
You can also quickly create timers:
Tween.call(myCallback).delay(3000).start(myManager);
Main features are:
Detailed documentation with code snippets and examples is available for the following topics:
Get started --- A step-by-step example to get you started, with code
The TweenAccessor interface --- Know how to implement it
Tweens and options --- See what are the possibilities
Timelines and options --- Learn how to build powerful sequences
Animating Android apps --- See how to use the engine with Android UIs
There is a dedicated forum for you: http://www.aurelienribon.com/forum/viewforum.php?f=5
Also, the following link will guide you to a discussion thread that started it all:
http://www.badlogicgames.com/forum/viewtopic.php?f=17&t=494