Skip to main content

Module anim

Module anim 

Source
Expand description

Animations (SPEC §4.4): planned once at bake time, then sampled as a pure function of progress.

Structs§

LaggedStart
Runs animations together, each starting lag_ratio of the previous one’s duration after it, manim’s LaggedStart. Like Parallel, all plan against the same start state.
Overlay
Helper shapes added to the scene now, invisible, animated by f from their added state, and removed when the clip ends: e.g. circumscribe and flash.
Parallel
Runs animations together; lasts as long as the longest. Each child keeps its own easing. Children targeting the same mobject: the last one wins.
ReplacementTransform
Morphs one mobject into another already in the scene, then swaps them, manim’s ReplacementTransform: target is hidden until the end, when it takes over and id is removed. See replacement_transform.
Sequence
Plays animations one after another, manim’s Succession; each plans against the scene as the previous one left it.
Timed
An animation with overridden timing; see AnimationExt.
Transform
Morphs a mobject into target (path, style and all).
Unwrite
Erases mobjects last to first, manim’s Unwrite: [write] played backwards. The mobjects stay in the scene until removed.
Update
Rewrites one mobject from its start-of-clip state and progress: the building block for the simple animations below.
UpdateGroup
Rewrites several mobjects together from each one’s start state, their joint bounding-box center and progress: the building block for the emphasis animations below.
Write
Draws mobjects in one after another, manim’s Write: each outline traces in, then its fill fades up while the outline fades back to its own style. See [write].

Enums§

Ease
Curve shape for RateFn::EaseIn and friends.
RateFn
Maps linear progress 0..=1 to eased progress.

Traits§

Animation
Something that changes the scene over a clip.
AnimationExt
Builder methods available on every animation.

Functions§

apply_function
Morphs every control point q towards f(q), manim’s ApplyFunction / ApplyPointwise.
circumscribe
Draws a yellow rectangle around ids and erases it again, manim’s Circumscribe.
create
Draws the outline in along its arc length.
draw_border_then_fill
Traces the outline in, then fills it, manim’s DrawBorderThenFill; lasts 2 s. Like one mobject of [write].
fade_in
Fades from transparent to the current opacity.
fade_out
Fades to transparent. The mobject stays in the scene until removed.
flash
Twelve short yellow rays burst outwards from p, manim’s Flash.
grow_from_center
Grows from a point at its center, manim’s GrowFromCenter.
indicate
Briefly scales up by 1.2 and tints yellow, then settles back, manim’s Indicate.
lagged_start
Staggers anims by lag_ratio (0 is Parallel, 1 is back to back).
move_to
Moves so the bounding-box center ends at p.
replacement_transform
Morphs mobject id into mobject target (e.g. just added), leaving only target.
rotate
Rotates counter-clockwise by angle radians about the start bounding-box center.
scale
Scales by factor about the start bounding-box center.
shift
Translates by v.
shrink_to_center
Shrinks to a point at its center. The mobject stays in the scene until removed.
spin_in
Grows from a point while turning a quarter turn into place, manim’s SpinInFromNothing.
transform
Morphs mobject id into target.
uncreate
Erases the outline backwards along its arc length; the reverse of create. The mobject stays in the scene until removed.
unwrite
Unwrites ids (e.g. the glyphs of a text); the reverse of [write].
wiggle
Wobbles in place while swelling slightly, manim’s Wiggle; lasts 2 s.
write
Writes ids in order (e.g. the glyphs of a text), staggered like manim’s Write.