Type Function Library transition.* Return value Table Revision Release 2022.3683 Keywords easing, animation, transition, tween, interpolation
Scales an object to the specified xScale
and yScale
amounts over a specified time.
transition.scaleTo( target, params )
Table. Any object that behaves like a table, for example display objects.
Table. A table that specifies the properties of the transition — see the next section for details.
Number. The xScale
value to scale to.
Number. The yScale
value to scale to.
Number. The time of the action.
String. Specifies the transition tag. The transition library can pause, resume, or cancel transitions sharing the same tag.
Number. Specifies the delay, in milliseconds, before the transition begins. Default is 0
.
Listener. Listener function to be called before the transition begins. This function will receive a reference to the associated object as its sole argument.
Listener. Listener function to be called after the transition completes. This function will receive a reference to the associated object as its sole argument.
Listener. Listener function to be called when the transition is paused. This function will receive a reference to the associated object as its sole argument.
Listener. Listener function to be called when the transition is resumed. This function will receive a reference to the associated object as its sole argument.
Listener. Listener function to be called when the transition is cancelled. This function will receive a reference to the associated object as its sole argument.
local square = display.newRect( 0, 0, 100, 100 ) transition.scaleTo( square, { xScale=2.0, yScale=1.5, time=2000 } )