---
title: xScale
framework: spritekit
role: symbol
role_heading: Instance Property
path: spritekit/sknode/xscale
---

# xScale

A scaling factor that multiplies the width of a node and its children.

## Declaration

```swift
var xScale: CGFloat { get set }
```

## Mentioned in

Getting Started with a Camera Resizing a Sprite in Nine Parts About Node Property Propagation Getting Started with Nodes

## Discussion

Discussion The xScale property scales the width of the node and all of its descendants. The scale value affects how a node’s frame is calculated, its hit test area, how it is drawn, and other similar characteristics. The default value is 1.0.

## See Also

### Scaling and Rotating

- [zRotation](spritekit/sknode/zrotation.md)
- [setScale(_:)](spritekit/sknode/setscale(_:).md)
- [yScale](spritekit/sknode/yscale.md)
