Skip to main content

Scale

Description:

  Creates a definition for an action that animates the x-axis and y-axis scale of a Node from one value to another.

Signature:

Scale: function(
duration: number,
from: number,
to: number,
easing?: Ease.EaseFunc --[[Ease.Linear]]
): ActionDef

Parameters:

ParameterTypeDescription
durationnumberThe duration of the animation in seconds.
fromnumberThe starting value of the x-axis and y-axis scale.
tonumberThe ending value of the x-axis and y-axis scale.
easingEaseFunc[optional] The easing function to use for the animation. Defaults to Ease.Linear if not specified.

Returns:

Return TypeDescription
ActionDefAn ActionDef object that can be used to run the animation on a Node.