One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

AnimationHandoffType

struct · iOS 18.0+ · SDK 27.1

struct AnimationHandoffType

The type of handoff the play animation method performs between a current animation and a new animation.

Members (5)

static · iOS 18.0+

snapshotAndReplace

TypeScript
static snapshotAndReplace(applyToAllLayers?: boolean): AnimationHandoffType
Swift declaration
static func snapshotAndReplace(applyToAllLayers: Bool = true) -> AnimationHandoffType

Stops the current animation and uses the current value of that animation as the blend value for the transition to the new animation. If `applyToAllLayers` is `false`, the handoff only replaces current animations that have the same `layerId` as the `blendLayerOffset` parameter in the ``playAnimation()`` call. If `applyToAllLayers` is `true`, the handoff replaces all animations regardless of the layer.

get · iOS 18.0+

stop

TypeScript
static get stop(): AnimationHandoffType
Swift declaration
static var stop: AnimationHandoffType { get }

Stops the specified animation.

get · iOS 18.0+

compose

TypeScript
static get compose(): AnimationHandoffType
Swift declaration
static var compose: AnimationHandoffType { get }

Adds the new animation to existing animations, and immediately starts the new animation. Use this handoff for additive animations. If the new animation isn't additive, then `compose` adds the new animation and removes the existing animation.

get · iOS 18.0+

default

TypeScript
static get default(): AnimationHandoffType
Swift declaration
static var `default`: AnimationHandoffType { get }

Provides the default behavior. If the `layerId` in the `playAnimation()` call is a non-zero value, the default behavior is a ``compose`` handoff . If the `layerId` is `0,` then the default behavior is a `snapshotAndReplace(applyToAllLayers: true)` handoff.

static · iOS 18.0+

replace

TypeScript
static replace(applyToAllLayers?: boolean): AnimationHandoffType
Swift declaration
static func replace(applyToAllLayers: Bool = true) -> AnimationHandoffType

Keeps playing the current animation during the transition time and uses the value from that animation as the blend value for the transition to the new animation. If `applyToAllLayers` is `false`, the handoff only replaces current animations that have the same `layerId` as the `blendLayerOffset` parameter in the `playAnimation()` call. If `applyToAllLayers` is `true`, the handoff replaces all animations regardless of the layer.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →