Table of Contents
The Animation API is simple but you will often need more
control, while still avoiding the complication of using clutter.Timeline
directly.
Although the clutter.Timeline
's new-frame
signal allows you to set actor
properties for each frame, PyClutter also provides Behaviour
s which can change specific properties
of one specific actor over time, using a simple numeric calculation. However, unlike the simplified Animation
API, using behaviours directly allows you to combine them to control multiple actors simultaneously and allows you to change the parameters of the
behaviours while the timeline is running.
For instance, clutter.BehaviourPath
moves the actor along a specified path, calculating the position on the path once per frame by calling a supplied alpha
callback. See the Using Alpha Functions section in the Animation chapter.
The following standard behaviours are available in PyClutter:
clutter.BehaviourDepth: Moves the actor along the z axis.
clutter.BehaviourEllipse: Moves the actor around an ellipse.
clutter.BehaviourOpacity: Changes the opacity of the actor.
clutter.BehaviourPath: Moves the actor along straight lines and bezier curves.
clutter.BehaviourRotate: Rotates the actor.
clutter.BehaviourScale: Scales the actor.