<!--
{
  "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/AnimationDefinition/trimmed(start:end:duration:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation19AnimationDefinitionPAAE7trimmed5start3end8durationxSdSg_A2HtF"
  },
  "title" : "trimmed(start:end:duration:)"
}
-->

# trimmed(start:end:duration:)

Edits the animation duration according to the specified time.

```
func trimmed(start: TimeInterval? = nil, end: TimeInterval? = nil, duration: TimeInterval? = nil) -> Self
```

## Parameters

`start`

The time within the underlying duration to begin playback.

`end`

The time within the underlying duration to end playback.

`duration`

The amount of time that overrides the underlying duration.

## Return Value

A version of the animation shortened or lengthened according
to the specified times.

## Discussion

If an argument property lies outside the underlying
[`duration`](/documentation/RealityKit/AnimationDefinition/duration), the animation plays back according to
the characteristics of its [`repeatMode`](/documentation/RealityKit/AnimationDefinition/repeatMode).

---

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)