Commit Graph

28 Commits

Author SHA1 Message Date
Emmanuele Bassi
657e0ce093 cookbook: Use clutter_timeline_set_repeat_count() 2012-02-13 17:30:22 +00:00
Emmanuele Bassi
18ec12a3b7 cookbook: Start migrating to the new API
Drop mentions of deprecated classes and API, and update the inline
example code.

Still some way to go, and the cookbook would probably benefit from
having a recipe on how to use ClutterActor to build a scene.
2012-01-24 15:12:41 +00:00
Emmanuele Bassi
72caef0de0 cookbooks/examples: Use g_signal_handlers_disconnect_by_func()
The disconnect_matched() function is a bit too complicated, and its
simpler wrapper disconnect_by_func() is functionally equivalent in the
cases used by the cookbook examples.
2011-09-02 12:19:30 +01:00
Elliot Smith
cf18836ca0 docs: Add recipe for animating an actor on a curved path
Show how to animate an actor using a ClutterPathConstraint.

This demonstrates how to get effects similar to
ClutterPathBehaviour with the modern animation APIs.

Includes 3 examples:

1) Simple ClutterPathConstraint used with implicit animations
2) ClutterPathConstraint used to simulate circular animation,
using ClutterAnimator
3) Creating simple curved path animations with non-linear
easing
2011-02-08 14:41:51 +00:00
Emmanuele Bassi
c444447cd3 timeline: Rename the reverse property to auto-reverse
Other frameworks expose the same functionality as "auto-reverse",
probably to match the cassette tape player. It actually makes sense
for Clutter to follow suit.
2010-12-17 12:07:52 +00:00
Elliot Smith
50849ac1fd cookbook: Use new API to reverse timeline
clutter_timeline_set_reverse() can be used to
automatically reverse a timeline's direction each time
it completes, so use that in looping animation recipe and
examples.
2010-12-02 10:56:06 +00:00
Emmanuele Bassi
038fe708f8 Merge remote branch 'elliot/cookbook-animations-scaling'
* elliot/cookbook-animations-scaling:
  cookbook: Add recipe for animated scaling of an actor
  cookbook: Add example of scaling a texture
  cookbook: Added "animated scaling" recipe skeleton
  cookbook: Added animated scaling example
2010-11-29 11:56:36 +00:00
Alexandre Quessy
01b93537ab Fixed "the the" repetitions in some doc strings
http://bugzilla.clutter-project.org/show_bug.cgi?id=2450
2010-11-25 18:18:51 +00:00
Elliot Smith
c9d0f8b26e cookbook: Add recipe for animated scaling of an actor
Recipe explains how to animate scaling a single actor.

Also covers scaling vs. resizing, scale center, and
scaling within layouts and containers.

The first example shows how animations around each scale
gravity look, as well as tracking the transformed position
and size of the actor and displaying those.

The second example is a simple image viewer with zoom in/out
using scaling.
2010-11-24 12:45:12 +00:00
Elliot Smith
c8f112876e cookbook: Added "animated scaling" recipe skeleton 2010-11-24 12:45:12 +00:00
Emmanuele Bassi
63cef64d17 docs: Fix some wrong function/signal/property names 2010-11-18 15:21:16 +00:00
Elliot Smith
8bdfa4ddee cookbook: Recipe for "looping animations"
Added a recipe giving examples of how to loop
animations for each part of the animation API (implicit,
animator, state).

The discussion covers looping a fixed number of times
and inverting a single implicit animation to create
a loop which goes back to its start on each iteration.
2010-11-15 11:23:04 +00:00
Elliot Smith
7eb248b1f0 cookbook: First draft for looping animations recipe
Includes video showing the looped animation and
basic section headings, plus outline of content and notes.
2010-11-15 11:23:04 +00:00
Elliot Smith
071029e373 cookbook: Recipe skeleton for "looping animations" 2010-11-15 11:23:04 +00:00
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