Off

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

class Off(priority_level=1, **kwargs)[source]

Bases: AnimationContext

Apply changes instantly, with no animation and no video time.

Everything inside the block takes effect at once: the scene jumps straight to the new state, and the video is no longer for it. This is how you set a scene up (position, color, materials, etc) without the viewer watching things slide into place, and how you make a cut rather than a transition.

Off takes priority over enclosing contexts by default, so a runtime further out cannot stretch it back into an animation.

Parameters:
  • priority_level (float | None) – Priority of this context; contexts can only be overridden by ones of equal or higher priority. Defaults to 1, above the ordinary default of 0, which is what keeps enclosing timing from re-animating this block.

  • **kwargs – Passed to AnimationContext. record_funcs defaults to False here, so nothing inside is recorded as a timed event.

Examples

with Off():
    square.move(RIGHT * 3)  # teleports, takes no video time
    square.color = BLUE

See also

Sync

Play the block’s animations simultaneously.

Seq

Play them one after another.

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