CGSGAnimationManager Class
Item Index
Properties
Methods
addAnimationKey
-
timeline
-
frame
-
value
Add a key
Parameters:
-
timeline
CGSGTimelinehandler to the timeline to animate
-
frame
Numberthe date for the key
-
value
Numbervalue for the attribute at the frame
Example:
this.sceneGraph.addAnimation(imgNode, "position.x", 2000, 200, "linear", true);
animate
-
node
-
attribute
-
duration
-
from
-
to
-
delay
Animate an attribute of a nodes
Parameters:
-
node
CGSGNodeHandler to the nodes to animate
-
attribute
StringString representing the attribute to animate ("position.y", "rotation.angle", "fill", ...)
-
duration
NumberDuration of the animation, in frame
-
from
NumberStart value
-
to
NumberEnd value
-
delay
NumberDelay before start the animation, in frames
Returns:
the timeline on which tha the animation was added
Example:
CGSG.animationManager.animate(imgNode, "position.x", 700, 0, 200, 0, true);
getTimeline
-
node
-
attribute
Return the timeline corresponding with the nodes and attribute. Create it if does not exists yet
Returns:
removeAnimationKey
-
timeline
-
frame
Parameters:
-
timeline
CGSGTimeline -
frame
Numberthe date for the key
Properties
listTimelines
Array
List of the timelines for the animations. A timeline consists of a list of animation keys for 1 attribute of 1 node