PyClutter

PyClutter is a Python programming API that allows you to create simple but visually appealing and involving user interfaces. It offers a variety of objects (actors) which can be placed on a canvas (stage) and manipulated by the application or the user. It is therefore a "retained mode" graphics API. Unlike traditional 2D canvas APIs, PyClutter allows these actors to move partly in the Z dimension.

This concept simplifies the creation of 3D interfaces compared to direct use of OpenGL or other 3D drawing APIs. For instance, it restricts the user interaction to the 2D plane facing the user, which is appropriate for today's devices allowing interaction only with a 2D plane such as a touchscreen. In addition, your application does not need to provide visual context to show the user which objects are, for instance, small rather than far away.

In addition, PyClutter provides timeline and behavior abstractions which simplify animation by allowing you to associate actor properties (such as position, rotation, or opacity) with callback functions, including pre-defined functions of time such as sine waves.

PyClutter uses the popular OpenGL 3D graphics API on regular desktop PCs, allowing it access to hardware acceleration. On handheld devices it can use OpenGL ES, a subset of the OpenGL API aimed at embedded devices. So, where necessary, you may also use OpenGL or OpenGL ES directly.

In the next few chapters you will learn how to place actors on the stage, how to set their properties, how to change their properties (including their position) over time by using timelines and behaviours, and how to do all this in response to user interaction.