Chapter 8. Behaviours

Table of Contents

Using Behaviours

The Animation API is simple but you will often need more control, while still avoiding the complication of using ClutterTimeline directly.

Although the ClutterTimeline's new-frame signal allows you to set actor properties for each frame, Clutter also provides Behaviours 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, ClutterBehaviourPath 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.

Figure 8.1. Effects of alpha functions on a path.

Effects of alpha functions on a path.

ClutterBehaviour Reference

ClutterAlpha Reference

The following standard behaviours are available in Clutter: