Movement Animation
class MovementAnimation<T : ComponentView>( componentView: T, fromX: Number = componentView.posX, toX: Number = componentView.posX, fromY: Number = componentView.posY, toY: Number = componentView.posY, duration: Int = DEFAULT_ANIMATION_SPEED) : ComponentAnimation<T>
Content copied to clipboard
A movement Animation.
Moves given ComponentView relative to parents anchor point.
Parameters
T
Generic ComponentView.
component View
ComponentView to animate
from X
Initial X position. Default: Current ComponentView.posX.
to X
Resulting X position. Default: Current ComponentView.posX.
from Y
Initial Y position. Default: Current ComponentView.posY.
to Y
Resulting Y position. Default: Current ComponentView.posY.
duration
Duration in milliseconds. Default: DEFAULT_ANIMATION_SPEED.
Constructors
Link copied to clipboard
fun <T : ComponentView> MovementAnimation( componentView: T, byX: Number = 0.0, byY: Number = 0.0, duration: Int = 1000)
Content copied to clipboard
A movement animation. Moves given ComponentView relative to parents anchor point.
Link copied to clipboard
fun <T : ComponentView> MovementAnimation( componentView: T, fromX: Number = componentView.posX, toX: Number = componentView.posX, fromY: Number = componentView.posY, toY: Number = componentView.posY, duration: Int = DEFAULT_ANIMATION_SPEED)
Content copied to clipboard
Creates a MovementAnimation for the given ComponentView.