File hp/display/Animation.lua

Functions

M:addCommand (command) Add a command run animation.
Usually does not need to be used.
You can add a custom command.
M:clear () Clears the definition animation.
M:executeCommand (index) To execute the command.
You will not be accessible from the outside.
M:fadeIn (sec, mode) The fade in objects.
M:fadeOut (sec, mode) The fade out objects.
M:init (targets, sec, easeType) The constructor.
M:isRunning () Returns whether the animation.
M: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.
M:moveAttr (attrID, value, sec, mode) Move the value of an attribute of the object.
M:moveColor (red, green, blue, alpha, sec, mode) Move the color of the object.
M:moveIndex (indexes, sec, mode) Move the indexes.
M:moveLoc (moveX, moveY, moveZ, sec, mode) Move the target objects.
When they are performed is done at the time of animation.
M:moveRot (x, y, z, sec, mode) Move the rotation of the object.
M:moveScl (x, y, z, sec, mode) Move the scale of the target object.
M:newActionCommand (actionFunc, sec, mode) To generate the asynchronous command with the action.
M:newCommand (playFunc, stopFunc) Command to generate the animation.
M:onCommandComplete () The event handler when the command completes.
You will not be accessible from the outside.
M:parallel (...) The parallel execution of the animation of the argument.
M:play (params) To start the animation.
If during the start will be ignored.
M:seekAttr (attrID, value, sec, mode) Seek the value of an attribute of the object.
M:seekColor (red, green, blue, alpha, sec, mode) Seek the color of the object.
M:seekLoc (x, y, z, sec, mode) Seek the target objects.
When they are performed is done at the time of animation.
M:seekRot (x, y, z, sec, mode) Seek the rotation of the object.
M:seekScl (x, y, z, sec, mode) Seek the scale of the target object.
M:sequence (...) The sequential execution of the animation argument.
M:setAttr (attrID, value) Sets the value of an attribute of the object.
M:setBottom (bottom) Sets the position of the target object.
When they are performed is done at the time of animation.
M:setColor (red, green, blue, alpha) Sets the color of the object.
M:setIndex (index) Sets the index.
M:setLeft (left) Sets the position of the target object.
When they are performed is done at the time of animation.
M:setLoc (x, y, z) Sets the position of the target object.
When they are performed is done at the time of animation.
M:setPos (left, top) Sets the position of the target object.
When they are performed is done at the time of animation.
M:setRight (right) Sets the position of the target object.
When they are performed is done at the time of animation.
M:setRot (x, y, z) Sets the rotation of the object.
M:setScl (x, y, z) Sets the scale of the target object.
M:setTop (top) Sets the position of the target object.
When they are performed is done at the time of animation.
M:setVisible (value) Sets the target object visible.
M:stop () Stop the animation.
M:wait (sec) Wait a specified amount of time.

Tables

Animation This is a class to animate the MOAIProp.


Functions

M: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
M:clear ()
Clears the definition animation.
M:executeCommand (index)
To execute the command.
You will not be accessible from the outside.

Parameters

  • index:
M:fadeIn (sec, mode)
The fade in objects.

Parameters

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

Return value:

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

Parameters

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

Return value:

self
M:init (targets, sec, easeType)
The constructor.

Parameters

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

Return value:

True in the case of animation.
M: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:

Return value:

self
M: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.

Return value:

self
M: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.

Return value:

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

Parameters

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

Return value:

self
M: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.

Return value:

self
M: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.

Return value:

self
M: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.

Return value:

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

Parameters

  • actionFunc: 関数名
  • sec: Time Animation.
  • mode: MOAIEaseType.

Return value:

command
M:newCommand (playFunc, stopFunc)
Command to generate the animation.

Parameters

  • playFunc: playFunc(callback)
  • stopFunc: stopFunc()

Return value:

command
M:onCommandComplete ()
The event handler when the command completes.
You will not be accessible from the outside.
M:parallel (...)
The parallel execution of the animation of the argument.

Parameters

  • ...: Animations

Return value:

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

Parameters

  • params: (option)Parameters that control the behavior.

Return value:

self
M: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.

Return value:

self
M: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.

Return value:

self
M: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.

Return value:

self
M: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.

Return value:

self
M: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.

Return value:

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

Parameters

  • ...: Animations

Return value:

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

Parameters

  • attrID: Attribute.
  • value: Value.

Return value:

self
M: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.

Return value:

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

Parameters

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

Return value:

self
M:setIndex (index)
Sets the index.

Parameters

  • index: Index.

Return value:

self
M: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.

Return value:

self
M: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.

Return value:

self
M: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.

Return value:

self
M: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.

Return value:

self
M: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.

Return value:

self
M: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.

Return value:

self
M: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.

Return value:

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

Parameters

  • value: Visible.

Return value:

self
M:stop ()
Stop the animation.
M:wait (sec)
Wait a specified amount of time.

Parameters

  • sec: Waiting time.

Return value:

self

Tables

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.

Valid XHTML 1.0!