hi again,

after some more googling i found this document:
http://chrislord.net/files/guadec09/outline

which says:
<<<
Chaining together multiple animations

Doing multiple animations that can't be done in a single animate call
complicates things slightly. You'd probably come across this if you want
to have animations on the same actor that start and end at different
times. There are various ways of doing this, and how you've implemented
your application and/or actors may affect which method you want to pick.

One method is to attach to the end of the singleton animation and start
any new animation necessary at the end of the last phase inside the
completed callback. The benefit of this is that interrupting the
animation is easy and you don't have to manage the lifetime of any
objects, but this is only feasible when your multi-part animation can
easily be broken up into distinct steps.

[chain-anim-1.c]

Using clutter_animation_new, you can create your own animation objects.
These won't conflict with the actor's animation singleton, which can be
used at the same time if so desired. In conjunction with
clutter_timeline_set_delay, it's possible to create whichever animations
you need, tell them to start when you need them, and that way you can
start off a chain of animations from a single function with no
callbacks.

[chain-anim-2.c]

Any animations you create yourself, you'll need to manage, however. So
that means unref'ing them if you don't plan on reusing them.

One further method is to somewhat combine the last two methods, by using
multiple animation objects and a single master timeline that controls
when you start each phase of the animation. This has the same drawbacks
of the first method, perhaps even more so, but in some situations can
make your animation easier to reverse.

>>>

so is this still up to date? would i either have to connect to the
"completed" signal of the animation or create the animations myself?

cheers,
moritz

Am Sonntag, den 06.05.2012, 00:54 +0200 schrieb Moritz Renftle:
> Hi folks,
> 
> my problem: i need to apply two independent animations to an actor:
> 1. turn around the z-axis infinitely within a given interval
> 2. ADDITIONALLY turn around the y-axis infinitely with a different speed, 
> different mode ... at the same time
> 
> this works using the deprecated clutter.behaviour stuff, but i'd like to use 
> implicit animations instead.
> i tried:
> actor.animatev(mode1, axis1, duration1, ...)
> actor.animatev(mode2, axis2, duration2, ...)
> 
> this doesn't bring the expected result, it seems like the two animations are 
> getting mixed up, sharing one timeline and one animation mode, as the two 
> movements happen in sync.
> furthermore, i need to be able to add the y-axis-rotation some time after the 
> z-axis-rotation, e.g. when the user clicks the actor.
> but doing this using the second line of the code above will actually reset 
> the current animation to the starting point and then start the "mixed" 
> animation.
> 
> is there a solution for this problem? apart of using behaviours?
> 
> thanks for your support,
> moritz


_______________________________________________
clutter-app-devel-list mailing list
clutter-app-devel-list@clutter-project.org
http://lists.clutter-project.org/listinfo/clutter-app-devel-list

Reply via email to