Animator


Object Hierarchy:

Object hierarchy for Animator

Description:

[ CCode ( type_id = "clutter_animator_get_type ()" ) ]
[ Version ( deprecated = true , deprecated_since = "1.12" , since = "1.2" ) ]
public class Animator : Object, Scriptable

Warning: Animator is deprecated since 1.12.

Animator is an object providing declarative animations for Object properties belonging to one or more Objects to Intervals.

Animator is used to build and describe complex animations in terms of "key frames". Animator is meant to be used through the Script definition format, but it comes with a convenience C API.

Animator is available since Clutter 1.2

Animator has been deprecated in Clutter 1.12. If you want to combine multiple transitions using key frames, use KeyframeTransition and TransitionGroup instead.

typeof (unichar2) typeof (unichar2) Key Frames

Every animation handled by a Animator can be described in terms of "key frames". For each Object property there can be multiple key frames, each one defined by the end value for the property to be computed starting from the current value to a specific point in time, using a given easing mode.

The point in time is defined using a value representing the progress in the normalized interval of [ 0, 1 ]. This maps the value returned by get_duration.

typeof (unichar2) typeof (unichar2) ClutterAnimator description for ClutterScript

Animator defines a custom "properties" key which allows describing the key frames for objects as an array of key frames.

The `properties` array has the following syntax:

 {
"properties" : [
{
"object" : object_id
"name" : property_name
"ease-in" : true_or_false
"interpolation" : interpolation_value
"keys" : [
[ progress, easing_mode, final_value ]
]
]
}

The following JSON fragment defines a Animator with the duration of 1 second and operating on the x and y properties of a Actor named "rect-01", with two frames for each property. The first frame will linearly move the actor from its current position to the 100, 100 position in 20 percent of the duration of the animation; the second will using a cubic easing to move the actor to the 200, 200 coordinates.

 {
"type" : "ClutterAnimator",
"duration" : 1000,
"properties" : [
{
"object" : "rect-01",
"name" : "x",
"ease-in" : true,
"keys" : [
[ 0.2, "linear", 100.0 ],
[ 1.0, "easeOutCubic", 200.0 ]
]
},
{
"object" : "rect-01",
"name" : "y",
"ease-in" : true,
"keys" : [
[ 0.2, "linear", 100.0 ],
[ 1.0, "easeOutCubic", 200.0 ]
]
}
]
}


Namespace: Clutter
Package: clutter-1.0

Content:

Properties:

Creation methods:

Methods:

Inherited Members:

All known members inherited from interface Clutter.Scriptable