---
title: AnimationGroup
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/animationgroup
---

# AnimationGroup

A collection of animations that play simultaneously.

## Declaration

```swift
struct AnimationGroup
```

## Overview

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. 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 objects that refer to the same animated property. To disperse their playback at runtime, give each definition a unique delay. important: The framework processes animations with a lower blendLayer first, and if the 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:)](realitykit/animationgroup/init(group:name:repeatmode:fillmode:trimstart:trimend:trimduration:offset:delay:speed:).md)

### Configuring the group

- [group](realitykit/animationgroup/group.md)
- [name](realitykit/animationgroup/name.md)
- [bindTarget](realitykit/animationgroup/bindtarget.md)
- [blendLayer](realitykit/animationgroup/blendlayer.md)
- [additive](realitykit/animationgroup/additive.md)
- [group](realitykit/animationgroup/group.md)

### Timing the group

- [speed](realitykit/animationgroup/speed.md)
- [delay](realitykit/animationgroup/delay.md)
- [duration](realitykit/animationgroup/duration.md)
- [offset](realitykit/animationgroup/offset.md)
- [trimDuration](realitykit/animationgroup/trimduration.md)
- [trimStart](realitykit/animationgroup/trimstart.md)
- [trimEnd](realitykit/animationgroup/trimend.md)

### Repeating group playback

- [repeatMode](realitykit/animationgroup/repeatmode.md)
- [fillMode](realitykit/animationgroup/fillmode.md)

## Relationships

### Conforms To

- [AnimationDefinition](realitykit/animationdefinition.md)

## See Also

### Animation definitions

- [SampledAnimation](realitykit/sampledanimation.md)
- [TweenMode](realitykit/tweenmode.md)
- [FromToByAnimation](realitykit/fromtobyanimation.md)
- [AnimationTimingFunction](realitykit/animationtimingfunction.md)
- [AnimationView](realitykit/animationview.md)
- [OrbitAnimation](realitykit/orbitanimation.md)
- [AnimationDefinition](realitykit/animationdefinition.md)
- [AnimationFillMode](realitykit/animationfillmode.md)
- [AnimationHandoffType](realitykit/animationhandofftype.md)
