Contents

scaleX(to:duration:)

Creates an action that changes the x scale value of a node to a new value.

Declaration

class func scaleX(to scale: CGFloat, duration: TimeInterval) -> SKAction

Parameters

  • scale:

    The new value for the node’s x scale value.

  • duration:

    The duration of the animation.

Return Value

A new action object.

Discussion

When the action executes, the node’s xScale property animates to the new value.

This action is not reversible; the reverse of this action has the same duration but does not change anything.

See Also

Animating the Scaling of a Node