<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNParticlePropertyController/init(animation:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNParticlePropertyController(cm)controllerWithAnimation:"
  },
  "title" : "init(animation:)"
}
-->

# init(animation:)

Creates a particle property controller with the specified Core Animation animation.

```
convenience init(animation: CAAnimation)
```

## Parameters

`animation`

A Core Animation object specifying the behavior of the property animation. Must not be nil.

    You can use different     <doc://com.apple.documentation/documentation/QuartzCore/CAAnimation>     subclasses to animate effects in different ways. For example, a     <doc://com.apple.documentation/documentation/QuartzCore/CABasicAnimation>     instance transitions a property from one value to another, and a     <doc://com.apple.documentation/documentation/QuartzCore/CAKeyframeAnimation>     instance transitions a property through a series of values. You use properties of the animation object to define its timing curve, repeat mode, and other options.

    SceneKit ignores the     <doc://com.apple.documentation/documentation/QuartzCore/CAPropertyAnimation/keyPath>    ,     <doc://com.apple.documentation/documentation/QuartzCore/CAMediaTiming/duration>    , and     <doc://com.apple.documentation/documentation/QuartzCore/CAMediaTiming/repeatCount>     properties of this animation object.

## Return Value

A new particle property controller.

## Discussion

To set up a particle property animation:

1. Create a <doc://com.apple.documentation/documentation/QuartzCore/CAAnimation> object defining how a property of each particle in the system changes over time.
2. Create a particle property controller using the [`init(animation:)`](/documentation/SceneKit/SCNParticlePropertyController/init(animation:)) method.
3. Attach the property controller to a particle system using the [`propertyControllers`](/documentation/SceneKit/SCNParticleSystem/propertyControllers) dictionary, choosing a key listed in Particle Property Keys to identify the particle property it animates.

For example, the following code sets up a controller to animate particle sizes:

```objc
// 1. Create and configure an animation object.
CAKeyframeAnimation *animation = [CAKeyframeAnimation animation];
animation.values = @[ @0.1, @1.0, @3.0, @0.5 ];
 
// 2. Create a property controller from the animation object.
SCNParticlePropertyController *controller =
    [SCNParticlePropertyController controllerWithAnimation:animation];
 
// 3. Assign the controller to a particle system, associating it with a particle property.
particleSystem.propertyControllers = @{ SCNParticlePropertySize: controller };
```

---

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)