SpatialAnimation
Represents the foundational information required for an animation, including its name, target binding, duration, repeat mode, and other essential properties.
Notes:
This class serves as a base for defining animation details and cannot directly create an animation resource.
To generate an com.pico.spatial.core.ecs.resource.AnimationResource, use one of its specialized subclasses, such as TweenAnimation, OrbitAnimation, etc.
Inheritors
Types
The companion object of SpatialAnimation.
Properties
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.
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.
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.
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.