Commit Graph

14 Commits

Author SHA1 Message Date
Emmanuele Bassi
4533edeef0 cookbook: Further clarification of the anchor point
Make sure to add a note on the behaviour of the anchor point. Ideally,
it would be nice to have a recipe about it in the Actor section.
2010-09-23 17:03:17 +01:00
Elliot Smith
ce0bd4e26c cookbook: Recipe for "moving actors"
This recipe explains how to use the three animation
approaches (implicit, State, Animator) to animate movement
of actors.

Includes some guidelines about which approach to use when, with
a full code example for each approach.

The discussion section covers some subtleties around animated
movement; namely: moving actors out of their containers; anchor
points and movement; moving in the depth axis; interactions
between animated movement and constraints.
2010-09-23 16:24:21 +01:00
Elliot Smith
b8d36a364f cookbook: Fixed markup in animations section
Fixed indentation on some mark-up in an unrelated recipe.
2010-09-23 16:24:21 +01:00
Elliot Smith
e8e360eaa7 cookbook: Added a recipe for reusing a complex animation
This recipe explains how to "reuse" the same animation
definition for different actors, by creating a new
instance of a "rig" (empty container) and animation
for the rig each time the animation is required.

An actor is then re-parented to the rig and animated
using it, rather than being animated directly.

JSON is used to define the rig + animator, to make
creating new instances of them simpler. The recipe
also discusses various caveats around using this
approach, rather than directly animating an actor.
2010-09-13 14:31:17 +01:00
Elliot Smith
6548bee56c cookbook: Added id for section in "rotating an actor" recipe
Added an id to a section in the "rotating an actor" recipe,
so that it can be referred to from the "reusing an animation"
recipe.
2010-09-13 12:25:47 +01:00
Elliot Smith
655c60aaa9 cookbook: Added recipe for complex animation
Uses ClutterAnimator to implement a reasonably complex
animation of a single actor (movement along a path with
simultaneous scaling).

Provides a metaphor for thinking about ClutterAnimator
animations (stage directions) and explains keys and key
frames in some depth. Also compares ClutterAnimator
with other possible approaches to this type of animation
(implicit animations, ClutterState).
2010-09-03 14:31:57 +01:00
Elliot Smith
7ed3517504 cookbook: Added recipe for animated rotation of an actor
New recipe covering how to animate rotation of
an actor (in all axes).

Covers various factors affecting rotation animation
(like orientation of axes, parent rotation/orientation),
as well as trying to make rotations easier to visualise
(e.g. describing how rotation direction is affected by
those factors, how a rotation can be expected to look
when animated). Uses implicit animations for code examples.

Also refers to a full code example which uses ClutterState.
2010-07-28 11:43:26 +01:00
Elliot Smith
da22150498 cookbook: Minor modification to wording to improve clarity
Text referred to three animation methods, but only provides
examples for two of them; and in future there may be more/fewer
than 3. So I reworded it.
2010-07-16 12:48:56 +01:00
Elliot Smith
962b3c6885 cookbook: Added recipe for fading actors in/out
Added a recipe showing how to fade actors in/out by
animating their opacity property, using both implicit
animations and ClutterState.
2010-07-16 12:44:39 +01:00
Emmanuele Bassi
1eec056bfd Merge remote branch 'elliot/cookbook-animation-inversion'
* elliot/cookbook-animation-inversion:
  cookbook: Fixed invalid XML tag
  cookbook: Added "inverting an animation" recipe
  docs: Enabled animation section
2010-07-12 21:25:25 +01:00
Elliot Smith
97ac28ee48 cookbook: Added introduction for animations section
Introduces basic concepts (timelines, alphas, frames)
common to different parts of the Clutter animation API.

Gives a high level overview of the three different
approaches to animation (implicit, ClutterAnimator,
ClutterState).
2010-07-12 17:15:16 +01:00
Elliot Smith
9d96c21de6 cookbook: Fixed invalid XML tag 2010-07-12 16:59:38 +01:00
Elliot Smith
6a443a0cd3 cookbook: Added "inverting an animation" recipe
Added a new recipe (based on the skeleton in the
animations section of the cookbook) about inverting
an animation by reversing the direction of its timeline.

Uses clutter_actor_animate() as the basic approach,
but mentions ClutterState and ClutterAnimator as well.
2010-07-12 15:45:49 +01:00
Emmanuele Bassi
089b9b545e cookbook: Split the cookbook chapters
Use separate files, to avoid making the XML too big and uneditable.

This breaks the PDF build.
2010-07-01 12:19:17 +01:00