One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

EmphasizeAction

struct · iOS 18.0+ · SDK 27.1

struct EmphasizeAction

An action that performs an animation to call attention to an entity. This action plays a preexisting animation, dependent on the ``EmphasizeAction/style`` and ``EmphasizeAction/motionType`` options. The example below creates an animation that causes the entity to bounce in a playful style. ```swift // An action that performs a bounce motion in a playful style. let emphasizeAction = EmphasizeAction(motionType: .bounce, style: .playful, isAdditive: false) // A five second animation that plays the preexisting animation. // // This animation causes the entity to raise up, and then drop, // appearing to bounce on the ground in a playful style, // before returning to its original position. let playfulBounceAnimation = try AnimationResource .makeActionAnimation(for: emphasizeAction, duration: 5.0, bindTarget: .transform) // Play the five second emphasize animation that causes the entity to // bounce in a playful style. entity.playAnimation(playfulBounceAnimation) ``` @Video( source: emphasizeaction-bounce, alt: "A screen recording of a red cube in a living room scene. At the start, the cube begins to raise up in a whimsical motion, and then drops, appearing to bounce. This motion is repeated twice more, before returning to its original position.", poster: emphasizeaction-bounce-poster ) - Important: This action directly animates the ``BindTarget/transform`` on the bound entity. Ensure a correct bind target is supplied when creating the animation.

Members (7)

get · iOS 18.0+

isAdditive

TypeScript
get isAdditive(): boolean
Swift declaration
var isAdditive: Bool

A Boolean value that indicates whether the animation system additively blends the action's output with the base value.

set · iOS 18.0+

isAdditive

TypeScript
set isAdditive(value: boolean)
Swift declaration
var isAdditive: Bool

A Boolean value that indicates whether the animation system additively blends the action's output with the base value.

init · iOS 18.0+

init

TypeScript
static init(motionType: EmphasizeAction_EmphasisMotionType, style?: EmphasizeAction_EmphasisAnimationStyle, isAdditive?: boolean): EmphasizeAction
Swift declaration
init(motionType: EmphasizeAction.EmphasisMotionType, style: EmphasizeAction.EmphasisAnimationStyle = .basic, isAdditive: Bool = false)

Creates a new emphasize action. - Parameters: - motionType: An option that implements animation effects. - style: An option that implements different kinds of animation timing. - isAdditive: A Boolean value that indicates whether the animation system additively blends the action's output with the base value.

get · iOS 18.0+

motionType

TypeScript
get motionType(): EmphasizeAction_EmphasisMotionType
Swift declaration
var motionType: EmphasizeAction.EmphasisMotionType

An option that implements animation effects.

set · iOS 18.0+

motionType

TypeScript
set motionType(value: EmphasizeAction_EmphasisMotionType)
Swift declaration
var motionType: EmphasizeAction.EmphasisMotionType

An option that implements animation effects.

get · iOS 18.0+

style

TypeScript
get style(): EmphasizeAction_EmphasisAnimationStyle
Swift declaration
var style: EmphasizeAction.EmphasisAnimationStyle

An option that implements different kinds of animation timing.

set · iOS 18.0+

style

TypeScript
set style(value: EmphasizeAction_EmphasisAnimationStyle)
Swift declaration
var style: EmphasizeAction.EmphasisAnimationStyle

An option that implements different kinds of animation timing.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

EmphasizeAction.animatedValueType

Passing a Swift type itself is not supported.

All RealityFoundation types →