One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

FromToByAnimation

struct · iOS 15.0+ · SDK 27.1

struct FromToByAnimation<Value> where Value : AnimatableData

An animation that starts, stops, or increments by a specific value. 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, ``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: - term A _from_ and _to_ value: The animation interpolates between _from_ and _to_, and ignores the _by_ value. - term A _from_ and _by_ value: The animation interpolates between _from_ and the sum of _from_ and _by_. - term Only a _from_ value: The animation interpolates between _from_ and the default source value. - term Only a _to_ value: The animation interpolates between the default source value and _to_. - term A _to_ and _by_ value: The animation starts at _by_ subtracted from _to _and completes at _to_. - term Only a _by_ value: The animation interpolates between the default source value and the sum of default source value and _by_. - term 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.

Members (0)

This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →