<!--
{
  "documentType" : "article",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/animating-particle-properties-across-disparate-values",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Animating Particle Properties Across Disparate Values"
}
-->

# Animating Particle Properties Across Disparate Values

Supply keyframe sequences to do linear or nonlinear particle animations.

## Discussion

An [`SKKeyframeSequence`](/documentation/SpriteKit/SKKeyframeSequence) object enables you to specify multiple values for an emitter node’s properties over a specific time period. The property values you choose may be arbitrary, which results in your ability to graph those property changes linearly or nonlinearly over time.

When you use a sequence, the values are not randomized. Instead, the sequence specifies all of the values of the property. Each keyframe value includes a value object and a timestamp. The timestamps are specified in a range from `0` to `1.0`, where `0` represents the birth of the particle and `1.0` represents its death.

The properties for which [`SKEmitterNode`](/documentation/SpriteKit/SKEmitterNode) offers a keyframe sequence are:

|Property                                                                                            |Specifies                                                                   |Example use                                                                                                                |
|----------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
|``doc://com.apple.spritekit/documentation/SpriteKit/SKEmitterNode/particleColorSequence``           |A sequence of arbitrary colors a particle should reflect over its lifetime. |Embers from a fire might specify the color sequence (white, yellow, orange, and brown) to appear hot, and then cool.       |
|``doc://com.apple.spritekit/documentation/SpriteKit/SKEmitterNode/particleColorBlendFactorSequence``|A sequence of color blend factors a particle should apply over its lifetime.|Embers from a fire might specify the color blend factor sequence (0, 1, 0, 1, … etc.) to simulate flickering.              |
|``doc://com.apple.spritekit/documentation/SpriteKit/SKEmitterNode/particleScaleSequence``           |A sequence of sizes of a particle over its lifetime.                        |Balloons might use the scale sequence (0.1, 1, 1, 1, 0.1) to simulate inflation, and flying for some time before deflating.|
|``doc://com.apple.spritekit/documentation/SpriteKit/SKEmitterNode/particleAlphaSequence``           |A sequence of levels of transparency a particle undergoes over its lifetime.|Fireflies might specify a disparate sequence of alpha values to simulate random lighting patterns as they travel.          |

The following code demonstrates using [`particleScaleSequence`](/documentation/SpriteKit/SKEmitterNode/particleScaleSequence) to animate the scale of an emitter node’s particles over their lifetime. Initially, the particles’ scale is `0.2` and then increases to `0.7` one-quarter of the way through the sequence. Three-quarters of the way through the sequence, the scale reaches its minimum size, `0.1`. It remains at this size until it dies.

```swift
let scaleSequence = SKKeyframeSequence(keyframeValues: [0.2, 0.7, 0.1],
                                       times: [0.0, 0.250, 0.75])
myEmitter.particleScaleSequence = scaleSequence
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)