Coppercube API Documentation
Class AnimatorFollowPath
Scene node animator making SceneNodes move along a path, uses PathSceneNode to define the path.
Extends
Animator.
Class Overview
AnimatorFollowPath(scene)
Scene node animator making SceneNodes move along a path.
Uses PathSceneNode to define the path.
- Parameters:
- scene
- The scene the animator is in
Field Attributes | Field Name and Description |
---|---|
<static> |
AnimatorFollowPath.EFPFEM_START_AGAIN
Constant for AnimatorFollowPath.EndMode, specifying to start the movement again when the end of the path has been reached.
|
<static> |
AnimatorFollowPath.EFPFEM_STOP
Constant for AnimatorFollowPath.EndMode, specifying to start the movement again when the end of the path has been reached.
|
Method Attributes | Method Name and Description |
---|---|
animateNode(n, timeMs)
Animates the scene node it is attached to and returns true if scene node was modified.
|
|
getType()
Returns the type of the animator.
|
|
setOptions(endmode, timeNeeded, lookIntoMovementDirection)
Sets the options for animating the node along the path
|
|
setPathToFollow(path)
Define the path this animator should follow
|
- Methods borrowed from class Animator:
- onKeyDown, onKeyUp, onMouseDown, onMouseMove, onMouseUp, onMouseWheel
Field Detail
<static>
AnimatorFollowPath.EFPFEM_START_AGAIN
Constant for AnimatorFollowPath.EndMode, specifying to start the movement again when the end of the path has been reached.
<static>
AnimatorFollowPath.EFPFEM_STOP
Constant for AnimatorFollowPath.EndMode, specifying to start the movement again when the end of the path has been reached.
Method Detail
animateNode(n, timeMs)
Animates the scene node it is attached to and returns true if scene node was modified.
- Parameters:
- n
- The Scene node which needs to be animated this frame.
- timeMs
- The time in milliseconds since the start of the scene.
getType()
Returns the type of the animator.
For the AnimatorFollowPath, this will return 'followpath'.
setOptions(endmode, timeNeeded, lookIntoMovementDirection)
Sets the options for animating the node along the path
- Parameters:
- endmode
- {Number} Mode specifying what should happen when the end of the path has been reached. Can be AnimatorFollowPath.EFPFEM_START_AGAIN or AnimatorFollowPath.EFPFEM_STOP
- timeNeeded
- {Number} Time in milliseconds needed for following the whole path, for example 10000 for 10 seconds.
- lookIntoMovementDirection
- {Boolean} true if the node should look into the movement direction or false if not.
setPathToFollow(path)
Define the path this animator should follow
- Parameters:
- path
- {PathSceneNode} scene node representing the path