action

The action library is used to create actions that can be run by nodes.  These actions can change the nodes properties over time, e.g., position, rotation, animating a sprite.  The actions can be chained together to form sequences or run in parallel.

Summary
actionThe action library is used to create actions that can be run by nodes.
Functions
action.rotateCreates an action to rotate a Node.
action.moveToXCreate an action that causes the target Node to change its x-coordinate to a new value in some time interval.
action.followPathCreate an action that causes the target Node to move along a given Path.
action.animateCreate an action that animates a Sprite.
action.repeatActionExectues an action repeatedly.

Functions

action.rotate

Creates an action to rotate a Node.

Parameters

angleThe angle by which to rotate the target Node
durationThe duration of the action

Returns

The created Action.

action.moveToX

Create an action that causes the target Node to change its x-coordinate to a new value in some time interval.

Parameters

xThe x-coordinate value.
durationThe time over which the Node should move from it’s current x value to the new one.

action.followPath

Create an action that causes the target Node to move along a given Path.

Parameters

pathA Path object that the target Node will follow
durationThe duration of the action
asOffsetAn optional boolean indicating whether or not the path is offset from the Node location (default false)
orientToPathAn optional boolean indicating whether or not the Node turns with the path (default false)

action.animate

Create an action that animates a Sprite.

Parameters

texturesOne or more textures to be used as the frames of the animation.
frameDurationThe duration of each frame in seconds.

action.repeatAction

Exectues an action repeatedly.

Parameters

actionThe action to be repeated.
repeat_countThe number of times to repeat the action - values less than or equal to zero mean repeat forever.
The basic visual type for Gemini SK.
A mathematical description of a series of shapes or lines.
A sprite object.
Close