Module flower.Animation

This is a class to animate the MOAIProp.

You can define the animation to flow. If you want to achieve complex animations, will say only this class.

Extends:

Info:

  • Release: V3.0.0
  • Author: Makoto

Functions

Animation:init (targets, sec, easeType) The constructor.
Animation:isRunning () Returns whether the animation.
Animation:isPaused () Returns whether the animation is paused.
Animation:setLeft (left) Sets the position of the target object.
When they are performed is done at the time of animation.
Animation:setTop (top) Sets the position of the target object.
When they are performed is done at the time of animation.
Animation:setRight (right) Sets the position of the target object.
When they are performed is done at the time of animation.
Animation:setBottom (bottom) Sets the position of the target object.
When they are performed is done at the time of animation.
Animation:setPos (left, top) Sets the position of the target object.
When they are performed is done at the time of animation.
Animation:setLoc (x, y, z) Sets the position of the target object.
When they are performed is done at the time of animation.
Animation:moveLoc (moveX, moveY, moveZ, sec, mode) Move the target objects.
When they are performed is done at the time of animation.
Animation:seekLoc (x, y, z, sec, mode) Seek the target objects.
Animation:setRot (x, y, z) Sets the rotation of the object.
Animation:moveRot (x, y, z, sec, mode) Move the rotation of the object.
Animation:seekRot (x, y, z, sec, mode) Seek the rotation of the object.
Animation:setScl (x, y, z) Sets the scale of the target object.
Animation:moveScl (x, y, z, sec, mode) Move the scale of the target object.
Animation:seekScl (x, y, z, sec, mode) Seek the scale of the target object.
Animation:setAttr (attrID, value) Sets the value of an attribute of the object.
Animation:moveAttr (attrID, value, sec, mode) Move the value of an attribute of the object.
Animation:seekAttr (attrID, value, sec, mode) Seek the value of an attribute of the object.
Animation:setIndex (index) Sets the index.
Animation:moveIndex (indexes, sec, mode) Move the indexes.
Animation:fadeIn (sec, mode) The fade in objects.
Animation:fadeOut (sec, mode) The fade out objects.
Animation:setColor (red, green, blue, alpha) Sets the color of the object.
Animation:moveColor (red, green, blue, alpha, sec, mode) Move the color of the object.
Animation:seekColor (red, green, blue, alpha, sec, mode) Seek the color of the object.
Animation:setVisible (value) Sets the target object visible.
Animation:setThrottle (newThrottle) Changes the throttle, as defined by MOAIAction.throttle, of the animation.
Animation:getThrottle () Returns the current throttle value
Animation:callFunc (func) Call function.
Animation:parallel (...) The parallel execution of the animation of the argument.
Animation:sequence (...) The sequential execution of the animation argument.
Animation:loop (maxCount, animation) Run the specified number the animation of the argument.
Animation:wait (sec) Wait a specified amount of time.
Animation:play (params) To start the animation.
Animation:playInternal (context) To execute the command.
Animation:resume () Resumes the animation if it's running and in pause state.
Animation:pause () Pauses the animation if it's running and not in pause state.
Animation:stop () Stop the animation.
Animation:clear () Clears the definition animation.
Animation:addCommand (command) Add a command run animation.
Animation:newCommand (playFunc, stopFunc, resumeFunc, pauseFunc) Command to generate the animation.
Animation:newActionCommand (actionFunc, sec, mode) To generate the asynchronous command with the action.


Functions

Animation:init (targets, sec, easeType)
The constructor.

Parameters:

  • targets (option)MOAIProp array. Or, MOAIProp instance.
  • sec (option)Animation time of each command.
  • easeType MOAIEaseType.
Animation:isRunning ()
Returns whether the animation.

Returns:

    True in the case of animation.
Animation:isPaused ()
Returns whether the animation is paused.

Returns:

    boolean indicating the pause state of the current animation.
Animation:setLeft (left)
Sets the position of the target object.
When they are performed is done at the time of animation.

Parameters:

  • left Left of the position.

Returns:

    self
Animation:setTop (top)
Sets the position of the target object.
When they are performed is done at the time of animation.

Parameters:

  • top Top of the position.

Returns:

    self
Animation:setRight (right)
Sets the position of the target object.
When they are performed is done at the time of animation.

Parameters:

  • right Right of the position.

Returns:

    self
Animation:setBottom (bottom)
Sets the position of the target object.
When they are performed is done at the time of animation.

Parameters:

  • bottom Bottom of the position.

Returns:

    self
Animation:setPos (left, top)
Sets the position of the target object.
When they are performed is done at the time of animation.

Parameters:

  • left Left of the position.
  • top Top of the position.

Returns:

    self
Animation:setLoc (x, y, z)
Sets the position of the target object.
When they are performed is done at the time of animation.

Parameters:

  • x X of the position.
  • y Y of the position.
  • z Z of the position.

Returns:

    self
Animation:moveLoc (moveX, moveY, moveZ, sec, mode)
Move the target objects.
When they are performed is done at the time of animation.

Parameters:

  • moveX X of the position.
  • moveY Y of the position.
  • moveZ Z of the position.
  • sec (option)Time animation.
  • mode (option)MOAIEaseType.

Returns:

    self
Animation:seekLoc (x, y, z, sec, mode)
Seek the target objects. When they are performed is done at the time of animation.

Parameters:

  • x X of the position.
  • y Y of the position.
  • z Z of the position.
  • sec (option)Time animation.
  • mode (option)MOAIEaseType.

Returns:

    self
Animation:setRot (x, y, z)
Sets the rotation of the object.

Parameters:

  • x Rotation of the x-axis.
  • y Rotation of the y-axis.
  • z Rotation of the z-axis.

Returns:

    self
Animation:moveRot (x, y, z, sec, mode)
Move the rotation of the object.

Parameters:

  • x Rotation of the x-axis.
  • y Rotation of the y-axis.
  • z Rotation of the z-axis.
  • sec (option)Time animation.
  • mode (option)MOAIEaseType.

Returns:

    self
Animation:seekRot (x, y, z, sec, mode)
Seek the rotation of the object.

Parameters:

  • x Rotation of the x-axis.
  • y Rotation of the y-axis.
  • z Rotation of the z-axis.
  • sec (option)Time animation.
  • mode (option)MOAIEaseType.

Returns:

    self
Animation:setScl (x, y, z)
Sets the scale of the target object.

Parameters:

  • x Scale of the x-axis
  • y Scale of the y-axis.
  • z Scale of the z-axis.

Returns:

    self
Animation:moveScl (x, y, z, sec, mode)
Move the scale of the target object.

Parameters:

  • x Scale of the x-axis
  • y Scale of the y-axis.
  • z Scale of the z-axis.
  • sec (option)Time animation.
  • mode (option)MOAIEaseType.

Returns:

    self
Animation:seekScl (x, y, z, sec, mode)
Seek the scale of the target object.

Parameters:

  • x Scale of the x-axis
  • y Scale of the y-axis.
  • z Scale of the z-axis.
  • sec (option)Time animation.
  • mode (option)MOAIEaseType.

Returns:

    self
Animation:setAttr (attrID, value)
Sets the value of an attribute of the object.

Parameters:

  • attrID Attribute.
  • value Value.

Returns:

    self
Animation:moveAttr (attrID, value, sec, mode)
Move the value of an attribute of the object.

Parameters:

  • attrID Attribute.
  • value Value.
  • sec (option)Time animation.
  • mode (option)MOAIEaseType.

Returns:

    self
Animation:seekAttr (attrID, value, sec, mode)
Seek the value of an attribute of the object.

Parameters:

  • attrID Attribute.
  • value Value.
  • sec (option)Time animation.
  • mode (option)MOAIEaseType.

Returns:

    self
Animation:setIndex (index)
Sets the index.

Parameters:

  • index Index.

Returns:

    self
Animation:moveIndex (indexes, sec, mode)
Move the indexes.

Parameters:

  • indexes Array of indices.
  • sec (option)Time animation.
  • mode (option)MOAIEaseType.

Returns:

    self
Animation:fadeIn (sec, mode)
The fade in objects.

Parameters:

  • sec (option)Time animation.
  • mode (option)MOAIEaseType.

Returns:

    self
Animation:fadeOut (sec, mode)
The fade out objects.

Parameters:

  • sec (option)Time animation.
  • mode (option)MOAIEaseType.

Returns:

    self
Animation:setColor (red, green, blue, alpha)
Sets the color of the object.

Parameters:

  • red Red.
  • green Green.
  • blue Blue.
  • alpha Alpha.

Returns:

    self
Animation:moveColor (red, green, blue, alpha, sec, mode)
Move the color of the object.

Parameters:

  • red Red.
  • green Green.
  • blue Blue.
  • alpha Alpha.
  • sec (option)Time animation.
  • mode (option)MOAIEaseType.

Returns:

    self
Animation:seekColor (red, green, blue, alpha, sec, mode)
Seek the color of the object.

Parameters:

  • red Red.
  • green Green.
  • blue Blue.
  • alpha Alpha.
  • sec (option)Time animation.
  • mode (option)MOAIEaseType.

Returns:

    self
Animation:setVisible (value)
Sets the target object visible.

Parameters:

  • value Visible.

Returns:

    self
Animation:setThrottle (newThrottle)
Changes the throttle, as defined by MOAIAction.throttle, of the animation. If the animation is already running, update throttle on all commands.

Parameters:

  • newThrottle Desired new throttle value

Returns:

    none
Animation:getThrottle ()
Returns the current throttle value

Returns:

    throttle
Animation:callFunc (func)
Call function.

Parameters:

  • func function object.

Returns:

    self
Animation:parallel (...)
The parallel execution of the animation of the argument.

Parameters:

  • ... Animations

Returns:

    self
Animation:sequence (...)
The sequential execution of the animation argument.

Parameters:

  • ... Animations

Returns:

    self
Animation:loop (maxCount, animation)
Run the specified number the animation of the argument.

If you specify a 0 to maxCount is an infinite loop. If maxCount of the function, and loop until it returns the function's return value is true.

Parameters:

  • maxCount Loop count, or, End judgment function.
  • animation Animation

Returns:

    self
Animation:wait (sec)
Wait a specified amount of time.

Parameters:

  • sec Waiting time.

Returns:

    self
Animation:play (params)
To start the animation. If during the start will be ignored.

Parameters:

  • params (option)Parameters that control the behavior.

Returns:

    self
Animation:playInternal (context)
To execute the command. You will not be accessible from the outside.

Parameters:

  • context
Animation:resume ()
Resumes the animation if it's running and in pause state.

Returns:

    self
Animation:pause ()
Pauses the animation if it's running and not in pause state.

Returns:

    self
Animation:stop ()
Stop the animation.
Animation:clear ()
Clears the definition animation.
Animation:addCommand (command)
Add a command run animation.

Usually does not need to be used. You can add a custom command.

Parameters:

  • command play,stop,restart
Animation:newCommand (playFunc, stopFunc, resumeFunc, pauseFunc)
Command to generate the animation.

Parameters:

  • playFunc playFunc(callback)
  • stopFunc stopFunc()
  • resumeFunc resumeFunc()
  • pauseFunc pauseFunc()

Returns:

    command
Animation:newActionCommand (actionFunc, sec, mode)
To generate the asynchronous command with the action.

Parameters:

  • actionFunc function
  • sec Time Animation.
  • mode MOAIEaseType.

Returns:

    command
generated by LDoc 1.3