Table of Contents
The actor.animate()
,
actor.animate_with_timeline()
, and
actor.animate_with_alpha()
functions change the
properties of a single actor over time, using either a standard
clutter.AnimationMode
or a simple numeric calculation. In
many cases this is an easier way to implement animation.
These are convenience functions that use the
clutter.Animation
object. You should not need to use
clutter.Animation
directly.
For instance, you could use actor.animate()
to
fade an actor by changing its "opacity" property, while also
moving it to a specified position by changing its "x" and
"y" properties, changing all three property values linearly over 1
second (1000 milliseconds). You should specify the values that the properties
should reach, regardless of their initial values.
rectangle.animate(clutter.LINEAR, 1000, "opacity", 150, 'x', 100.0, 'y', 100.0)