Scales the sprite node to a specified size.
On This Page
func scale(to size: CGSize)
This method works by setting the sprite node's xScale and yScale to achieve the specified size in its parent's coordinate space.
Learn how the anchor point affects a sprite's position.
var size: CGSize
The dimensions of the sprite, in points.
var anchorPoint: CGPoint
Defines the point in the sprite that corresponds to the node’s position.