SpatialAnimation

open class SpatialAnimation

Represents the foundational information required for an animation, including its name, target binding, duration, repeat mode, and other essential properties.

Notes:

Inheritors

Types

Link copied to clipboard
object Companion

The companion object of SpatialAnimation.

Properties

Link copied to clipboard
var additive: Boolean

Whether to add the animation to the current animation. If set to true, the animation is additive, meaning it will be combined with any existing animations on the entity, allowing for complex layered effects.

Link copied to clipboard

The AnimationBindTarget of the animation. This defines what aspect of the entity the animation will affect, such as position, rotation, scale, or material properties. The bind target is crucial for ensuring that the animation applies to the correct entity attribute.

Link copied to clipboard
var delay: Float

The delay before the animation starts, in seconds. This allows for a pause before the animation begins, which can be useful for synchronizing animations or creating staggered effects.

Link copied to clipboard
var duration: Float

The duration of the animation in seconds. This specifies how long the animation will take to complete one cycle. It is an essential property that affects the speed and timing of the animation.

Link copied to clipboard
var name: String

The name of the animation. This is a descriptive identifier for the animation, which can be used to reference or manage animations within a system. It helps in distinguishing between different animations applied to entities.

Link copied to clipboard
var offset: Float

The offset time in seconds of the animation. This is used to start the animation at a specific time offset, which can be useful for aligning animations that start at non-zero times or for creating complex sequences.

Link copied to clipboard
var repeatCount: Int

The repeat count of the animation. This specifies how many times the animation should repeat. A value of -1 means it will play infinitely; a value of 0 means it will play once; a value greater than 0 indicates multiple repetitions.

Link copied to clipboard

The RepeatMode of the animation. This determines how the animation behaves after completing a cycle. It can be set to repeat, reverse, or not repeat at all, allowing for various looping behaviors.

Link copied to clipboard
var speed: Float

The speed of the animation. This multiplier affects how fast the animation plays. A value greater than 1 speeds up the animation, while a value between 0 and 1 slows it down.

Link copied to clipboard
var trimDuration: Float?

The duration of the animation to trim, in seconds. This defines the portion of the animation that remains after trimming the start and end. It helps in focusing on a specific segment of the animation.

Link copied to clipboard
var trimEnd: Float?

The ending time of the animation to trim, in seconds. This property allows for trimming the animation's end, effectively cutting out the final portion of the animation sequence.

Link copied to clipboard
var trimStart: Float?

The starting time of the animation to trim, in seconds. This property allows for trimming the animation's start, effectively cutting out the initial portion of the animation sequence.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String