isAdditive
TypeScriptget isAdditive(): booleanSwift declarationvar isAdditive: BoolA Boolean value that indicates whether the animation system additively blends the action's output with the base value.
struct · iOS 18.0+ · SDK 27.1
struct SpinActionAn action which animates the transform of an entity to rotate around a specified local axis. This action rotates an entity around itself from a specified ``SpinAction/localAxis`` gradually adjusting its local transform. The ``SpinAction/localAxis`` specifies which cartesian axis around which to rotate in local space. The full spin completes after the action has ended. The example below creates an animation that spins an entity around the x-axis two times for five seconds with a linear transition. ```swift // Create an action that performs a spin around the specified local axis // with a linear transition. let spinAction = SpinAction(revolutions: 2, localAxis: [1, 0, 0], timingFunction: .linear, isAdditive: false) // A five second animation that plays an animation causing the entity to // spin around a specified local axis. let spinAnimation = try AnimationResource .makeActionAnimation(for: spinAction, duration: 5.0, bindTarget: .transform) // Play the five second spin animation. entity.playAnimation(spinAnimation) ``` - Note: Use the ``SpinAction/localAxis`` to determine whether the entity spins clockwise or counterclockwise. - Important: This action directly animates the ``BindTarget/transform`` on the bound entity. Ensure a correct bind target is supplied when creating the animation.
get isAdditive(): booleanSwift declarationvar isAdditive: BoolA Boolean value that indicates whether the animation system additively blends the action's output with the base value.
set isAdditive(value: boolean)Swift declarationvar isAdditive: BoolA Boolean value that indicates whether the animation system additively blends the action's output with the base value.
static init(revolutions: number, localAxis?: SDKHandle, timingFunction?: AnimationTimingFunction, isAdditive?: boolean): SpinActionSwift declarationinit(revolutions: Float, localAxis: SIMD3<Float> = [0, 1, 0], timingFunction: AnimationTimingFunction = .default, isAdditive: Bool = false)Creates a new spin action. - Parameters: - revolutions: The number of rotations to complete before stopping. - localAxis: A vector that describes the axis of rotation (in local space). - timingFunction: A timing function that controls the progress of the animation. - isAdditive: A Boolean value that indicates whether the animation system additively blends the action's output with the base value.
get revolutions(): numberSwift declarationvar revolutions: FloatThe number of rotations to complete before stopping.
set revolutions(value: number)Swift declarationvar revolutions: FloatThe number of rotations to complete before stopping.
get timingFunction(): AnimationTimingFunctionSwift declarationvar timingFunction: AnimationTimingFunctionA timing function that controls the progress of the animation. The default value of this property is ``AnimationTimingFunction/default``. This produces an ease transition.
set timingFunction(value: AnimationTimingFunction)Swift declarationvar timingFunction: AnimationTimingFunctionA timing function that controls the progress of the animation. The default value of this property is ``AnimationTimingFunction/default``. This produces an ease transition.
get localAxis(): SDKHandleSwift declarationvar localAxis: SIMD3<Float>A vector that describes the axis of rotation (in local space). The default value of this property is `[0, 1, 0]`, meaning the rotation occurs around the y-axis.
set localAxis(value: SDKHandle)Swift declarationvar localAxis: SIMD3<Float>A vector that describes the axis of rotation (in local space). The default value of this property is `[0, 1, 0]`, meaning the rotation occurs around the y-axis.
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
SpinAction.animatedValueType
Passing a Swift type itself is not supported.