<!--
{
  "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/FromToByAnimation",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation17FromToByAnimationV"
  },
  "title" : "FromToByAnimation"
}
-->

# FromToByAnimation

An animation that starts, stops, or increments by a specific value.

```
struct FromToByAnimation<Value> where Value : AnimatableData
```

## Overview

To animate an entity or scene, this structure gradually changes a
parameter’s value over time. You can specify a *from* value, which
represents the animated property’s initial value at the beginning of the
animation. You can also specify a *to* value, which determines the value of
the property at the end of the animation. Alternatively, you can set a *by*
value. The framework adds the *by* value to the property’s initial state to
calculate the value at the end of the animation.

To specify the property that this struct animates, define `bindTarget` in
the intializer,

[`init(name:from:to:by:duration:timing:isAdditive:bindTarget:blendLayer:repeatMode:fillMode:trimStart:trimEnd:trimDuration:offset:delay:speed:)`](/documentation/RealityKit/FromToByAnimation/init(name:from:to:by:duration:timing:isAdditive:bindTarget:blendLayer:repeatMode:fillMode:trimStart:trimEnd:trimDuration:offset:delay:speed:)).

### Configure the animation inputs

This animation supports varying input combinations, which exhibit the
following behavior. When you specify:

- A *from* and *to* value: The animation interpolates between *from*
  and *to*, and ignores the *by* value.
- A *from* and *by* value: The
  animation interpolates between *from* and the sum of *from* and *by*.
- Only a *from* value: The animation interpolates between *from* and the
  default source value.
- Only a *to* value: The animation interpolates
  between the default source value and *to*.
- A *to* and *by* value: The
  animation starts at *by* subtracted from _to _and completes at *to*.
- Only a *by* value: The animation interpolates between the default source
  value and the sum of default source value and *by*.
- No *from*, *to*, or *by* value: The animation interpolates between
  the default source value and the default target value.

The default source value is the base value of the of animated property. If
multiple animations target the property, then the framework observes the
output of the previous animation as the subsequent animation’s default
source value. The default target value is the base value of the animated
property.

## Topics

### Creating an animation

[`init(name:from:to:by:duration:timing:isAdditive:bindTarget:blendLayer:repeatMode:fillMode:trimStart:trimEnd:trimDuration:offset:delay:speed:)`](/documentation/RealityKit/FromToByAnimation/init(name:from:to:by:duration:timing:isAdditive:bindTarget:blendLayer:repeatMode:fillMode:trimStart:trimEnd:trimDuration:offset:delay:speed:))

Creates an animation that interpolates between two values for a property
of the target entity.

[`init(jointNames:name:isScaleAnimated:isRotationAnimated:isTranslationAnimated:from:to:by:duration:timing:isAdditive:bindTarget:blendLayer:repeatMode:fillMode:trimStart:trimEnd:trimDuration:offset:delay:speed:)`](/documentation/RealityKit/FromToByAnimation/init(jointNames:name:isScaleAnimated:isRotationAnimated:isTranslationAnimated:from:to:by:duration:timing:isAdditive:bindTarget:blendLayer:repeatMode:fillMode:trimStart:trimEnd:trimDuration:offset:delay:speed:))

Creates an animation that interpolates between two configurations of the
given joints.

### Configuring the animation

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

A textual name for the animation.

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

A textual name that identifies the particular property that animates.

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

The order in which the framework composites the animation.

[`jointNames`](/documentation/RealityKit/FromToByAnimation/jointNames)

Joint names that define the joints in the skeletal pose.

[`isScaleAnimated`](/documentation/RealityKit/FromToByAnimation/isScaleAnimated)

A Boolean value that indicates whether that animation interpolates
changes to the target’s size.

[`isRotationAnimated`](/documentation/RealityKit/FromToByAnimation/isRotationAnimated)

A Boolean value that indicates whether the animation interpolates
rotational changes.

[`isTranslationAnimated`](/documentation/RealityKit/FromToByAnimation/isTranslationAnimated)

A Boolean value that indicates whether the animation interpolates
changes to the target object’s position.

[`isAdditive`](/documentation/RealityKit/FromToByAnimation/isAdditive)

A Boolean value that indicates whether the animation blends additively
with concurrent animations.

### Defining a start value

[`fromValue`](/documentation/RealityKit/FromToByAnimation/fromValue-2h2wq)

[`fromValue`](/documentation/RealityKit/FromToByAnimation/fromValue-8dr21)

[`fromValue`](/documentation/RealityKit/FromToByAnimation/fromValue-4tv25)

[`fromValue`](/documentation/RealityKit/FromToByAnimation/fromValue-umpp)

[`fromValue`](/documentation/RealityKit/FromToByAnimation/fromValue-12wzs)

[`fromValue`](/documentation/RealityKit/FromToByAnimation/fromValue-5kx2b)

[`fromValue`](/documentation/RealityKit/FromToByAnimation/fromValue-6msd)

[`fromValue`](/documentation/RealityKit/FromToByAnimation/fromValue-5ckq7)

### Defining an incremental value

[`byValue`](/documentation/RealityKit/FromToByAnimation/byValue-9zcwv)

[`byValue`](/documentation/RealityKit/FromToByAnimation/byValue-5fewc)

[`byValue`](/documentation/RealityKit/FromToByAnimation/byValue-3soon)

[`byValue`](/documentation/RealityKit/FromToByAnimation/byValue-8na9o)

[`byValue`](/documentation/RealityKit/FromToByAnimation/byValue-460jf)

[`byValue`](/documentation/RealityKit/FromToByAnimation/byValue-1pq4)

[`byValue`](/documentation/RealityKit/FromToByAnimation/byValue-3bp3q)

[`byValue`](/documentation/RealityKit/FromToByAnimation/byValue-7zwq3)

### Defining an end value

[`toValue`](/documentation/RealityKit/FromToByAnimation/toValue-50qb4)

[`toValue`](/documentation/RealityKit/FromToByAnimation/toValue-8jzdy)

[`toValue`](/documentation/RealityKit/FromToByAnimation/toValue-4nrhr)

[`toValue`](/documentation/RealityKit/FromToByAnimation/toValue-4m4pm)

[`toValue`](/documentation/RealityKit/FromToByAnimation/toValue-4wi6r)

[`toValue`](/documentation/RealityKit/FromToByAnimation/toValue-6a1uy)

[`toValue`](/documentation/RealityKit/FromToByAnimation/toValue-813jk)

[`toValue`](/documentation/RealityKit/FromToByAnimation/toValue-5ki8u)

### Timing the animation

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

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

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

An amount of time that elapses before the animation plays.

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

The total playback time of the animation.

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

The time, in seconds, at which the animation begins within the duration.

[`timing`](/documentation/RealityKit/FromToByAnimation/timing)

An option that determines the animation’s pace over time.

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

An optional duration that overrides the calculated duration.

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

The time, in seconds, at which the animation plays.

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

The time, in seconds, at which the animation stops.

### Repeating animation playback

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

An option that determines how the animation repeats.

[`fillMode`](/documentation/RealityKit/FromToByAnimation/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)