---
title: "trimmed(start:end:duration:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/animationdefinition/trimmed(start:end:duration:)"
---

# trimmed(start:end:duration:)

Edits the animation duration according to the specified time.

## Declaration

```swift
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

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

## Discussion

Discussion If an argument property lies outside the underlying duration, the animation plays back according to the characteristics of its repeatMode.

## See Also

### Timing the animation

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