You may use a custom calculation callback, instead of a standard clutter.AnimationMode
enum value such as LINEAR
, by using the actor.animate_with_alpha()
function, providing a clutter.Alpha
.
The clutter.Alpha
object is constructed with a calculation callback and a clutter.Timeline
which tells it when a new frame needs a new value to be calculated. Your alpha
callback will need to call alpha.get_timeline()
so it can return a value based on the timeline's current progress, using the timeline.get_progress()
function.
See the Behaviours chapter for an example that uses a clutter.Alpha
.