Skip to main content

Opacity

Description:

  Creates a definition for an action that animates the opacity of a Node from one value to another.

Signature:

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

Parameters:

ParameterTypeDescription
durationnumberThe duration of the animation in seconds.
fromnumberThe starting opacity value of the Node (0-1.0).
tonumberThe ending opacity value of the Node (0-1.0).
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.