CGSGAnimationManager Class
Item Index
Properties
Methods
addAnimationKey
-
timeline -
frame -
value
Add a key
Parameters:
-
timelineCGSGTimelinehandler to the timeline to animate
-
frameNumberthe date for the key
-
valueNumbervalue 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:
-
nodeCGSGNodeHandler to the nodes to animate
-
attributeStringString representing the attribute to animate ("position.y", "rotation.angle", "fill", ...)
-
durationNumberDuration of the animation, in frame
-
fromNumberStart value
-
toNumberEnd value
-
delayNumberDelay 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:
-
timelineCGSGTimeline -
frameNumberthe 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
