<!--
{
  "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/AnimationFillMode/both",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation17AnimationFillModeV4bothACvpZ"
  },
  "title" : "both"
}
-->

# both

An option that displays the animation’s initial frame or final frame
when playback occurs outside of the normal duration.

```
static let both: AnimationFillMode
```

## Discussion

For example, if you extend a hand-waving animation’s duration by one
second in both directions by setting [`trimStart`](/documentation/RealityKit/SampledAnimation/trimStart) to
`-1.0`, and [`trimEnd`](/documentation/RealityKit/SampledAnimation/trimEnd) to
[`duration`](/documentation/RealityKit/SampledAnimation/duration) + `1.0`, a [`fillMode`](/documentation/RealityKit/SampledAnimation/fillMode)
of `both` determines that the hand holds its initial appearance for one
second before continuing to wave. Then, the animation freezes on its
final hand-waving frame for one second before disappearing.

---

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)