logo
pub struct AnimationBuilder<T> { /* private fields */ }
Expand description

An AnimationBuilder is used to build an animation for a component value.

Set options on it such as curve / easing type, delay, target and finally submit the animation.

Note: bools and integers (also all kinds of entity references) will be set to their target directly, however delay can be used to delay the set of the value.

Implementations

Creates an AnimationBuilder from a ValueAccessor.

Sets the delay of the animation (how long to wait before it starts)

Sets the target value that the animated value will approach.

Sets the curve shape of the value animation.

Sets the number of times the animation will loop. 0 is currently undefined.

Sets the method of smoothing when the animation target changes.

Enqueues the animation instead of cancelling a currently on-going animation (if any).

Finalizes the animation.

Finalizes the animation.

Also gives you the opportunity to pass in a callback that will be called once the animation is finished. For this to work, you must call entity_messenger().process_messages() from your world_update function.

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.