ComposedEasing

Qualified name: algan.animation\_timeline.animation\_contexts.ComposedEasing

class ComposedEasing(rfunc, **kwargs)[source]

Bases: AnimationContext

Bend the timing of the block’s animations through an extra rate function.

The given function is composed with whatever rate function is already in effect, rather than replacing it, so an enclosing ease is kept and this one layers on top. Use it to make a run of animations rush, dawdle or bounce without restating the base easing.

Parameters:
  • rfunc – Rate function mapping progress in [0, 1] to adjusted progress. Composed with the enclosing context’s rate function.

  • **kwargs (Any) – Passed to AnimationContext.

Examples

with ComposedEasing(easings.there_and_back):
    square.move(RIGHT)  # goes out and comes back

Methods

Attributes

animation_manager

child_contexts

combine_easing

composed_easing

current_time

Where the authoring cursor sits within this context, in seconds.

easing

end_time

The furthest time anything recorded in this context reaches, in seconds.

equalize_runtimes

finished

kwargs

lag_ratio

new_animation

new_mobs

prev_context

priority_level

record_attr_modifications

record_funcs

runtime

runtime_per_part

spawn_at_end