Structure

AnimationTimingFunction

The pacing of an animation transition.

Declaration

struct AnimationTimingFunction

Overview

Use an animation timing function to control the pace of an animation transition when you call one of an entity’s animated move methods, like move(to:relativeTo:duration:timingFunction:). If you omit a timing function from the call, the method uses the default timing function.

Topics

Creating Timing Functions

static var `default`: AnimationTimingFunction

A timing function that produces the default curve for the transition.

static var easeIn: AnimationTimingFunction

A timing function that produces a gradual starting transition.

static var easeInOut: AnimationTimingFunction

A timing function that produces a gradual starting and ending transition.

static var easeOut: AnimationTimingFunction

A timing function that produces a gradual ending transition.

static var linear: AnimationTimingFunction

A timing function that produces a linear transition.

static func cubicBezier(controlPoint1: SIMD2<Float>, controlPoint2: SIMD2<Float>) -> AnimationTimingFunction

Creates a timing function that accelerates and then decelerates towards the target value with the cubic bezier shape specified by two control points.

Comparing Timing Functions

static func == (AnimationTimingFunction, AnimationTimingFunction) -> Bool

Indicates whether two animation timing functions are equal.

static func != (AnimationTimingFunction, AnimationTimingFunction) -> Bool

Indicates whether two animation timing functions are not equal.

func hash(into: inout Hasher)

Hashes the essential components of the timing function by feeding them into the given hash function.

var hashValue: Int

The hashed value of the timing function.

Relationships

Conforms To

See Also

Animation Playback

class AnimationPlaybackController

A controller that manages animation playback.

class AnimationResource

An animation that can be played by an entity.

enum AnimationEvents

Events triggered by the RealityKit animation system.