<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/AnimationGroup",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation14AnimationGroupV"
  },
  "title" : "AnimationGroup"
}
-->

# AnimationGroup

A collection of animations that play simultaneously.

```
struct AnimationGroup
```

## Overview

This structure concurrently starts the animations it contains. Use a group
to:

- Animate more than one property at once.
- Animate the same property at different times.

### Animate multiple properties concurrently

For each animatable property your animation needs to control, create a group
and add an animation to the array argument of the initializer. The following
listing begins coding an animation group that colorizes 3D numbers that
count down over a 4-second duration.

```swift
let frames: [Float] = [3.0, 2.0, 1.0, 0.0]
let duration = TimeInterval(frames.count)
let anim1 = FromToByAnimation<Float>(name: "colorize", from: 0.0, to: 1.0,
    duration: duration, bindTarget: .parameter("foo"))
let anim2 = SampledAnimation<Float>(frames: frames, name: "count down",
    frameInterval: duration / frames.count, bindTarget: .parameter("bar"))
let group = AnimationGroup(group: [anim1, anim2], name: "group")
```

### Create a sequence for the same animation

You can play the same animation at different times by grouping multiple
[`AnimationDefinition`](/documentation/RealityKit/AnimationDefinition) objects that refer to the same animated property. To
disperse their playback at runtime, give each definition a unique
[`delay`](/documentation/RealityKit/AnimationDefinition/delay).

> Important: The framework processes animations with a lower
> ``doc://com.apple.RealityKit/documentation/RealityKit/AnimationGroup/blendLayer`` first, and if the
> ``doc://com.apple.RealityKit/documentation/RealityKit/AnimationGroup/blendLayer`` matches, in the order in which they appear in
> the groups array. If two animations on the same property overlap durations
> at runtime, the one that the framework processes second overwrites the
> first.

## Topics

### Creating an animation group

[`init(group:name:repeatMode:fillMode:trimStart:trimEnd:trimDuration:offset:delay:speed:)`](/documentation/RealityKit/AnimationGroup/init(group:name:repeatMode:fillMode:trimStart:trimEnd:trimDuration:offset:delay:speed:))

Creates a collection of animations that play simultaneously.

### Configuring the group

[`group`](/documentation/RealityKit/AnimationGroup/group)

A collection of animations to run.

[`name`](/documentation/RealityKit/AnimationGroup/name)

A textual name for the group.

[`bindTarget`](/documentation/RealityKit/AnimationGroup/bindTarget)

A textual name that refers to a property on which to run the grouped
animations.

[`blendLayer`](/documentation/RealityKit/AnimationGroup/blendLayer)

The order in which the framework composites the animation.

[`additive`](/documentation/RealityKit/AnimationGroup/additive)

A Boolean value that indicates whether the animation builds on the
current state of the target entity or resets the state before running.

[`group`](/documentation/RealityKit/AnimationGroup/group)

A collection of animations to run.

### Timing the group

[`speed`](/documentation/RealityKit/AnimationGroup/speed)

A factor that increases or decreases the animation’s rate of playback.

[`delay`](/documentation/RealityKit/AnimationGroup/delay)

An amount of time that lapses before the animation plays.

[`duration`](/documentation/RealityKit/AnimationGroup/duration)

The total playback time of the animation.

[`offset`](/documentation/RealityKit/AnimationGroup/offset)

The time, in seconds, at which the animations begin within the duration.

[`trimDuration`](/documentation/RealityKit/AnimationGroup/trimDuration)

An optional duration that overrides the calculated duration.

[`trimStart`](/documentation/RealityKit/AnimationGroup/trimStart)

The time, in seconds, at which the animations play.

[`trimEnd`](/documentation/RealityKit/AnimationGroup/trimEnd)

The time, in seconds, at which the animations stop.

### Repeating group playback

[`repeatMode`](/documentation/RealityKit/AnimationGroup/repeatMode)

An option that determines how the animations repeat.

[`fillMode`](/documentation/RealityKit/AnimationGroup/fillMode)

An option that determines which data displays outside of the normal
duration.



---

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)