VariableModifier

class manim_eng.components.base.modifiers.VariableModifier(terminals: list[Terminal], label: str | Value | None = None, annotation: str | Value | None = None, **kwargs: Any)

Bases: Component

Modifier to add diagonal arrow to a component to signify variability.

Attributes

VariableModifier.animate

Used to animate the application of any method of self.

VariableModifier.animation_overrides

VariableModifier.color

VariableModifier.depth

The depth of the mobject.

VariableModifier.fill_color

If there are multiple colors (for gradient) this returns the first one

VariableModifier.height

The height of the mobject.

VariableModifier.n_points_per_curve

VariableModifier.sheen_factor

VariableModifier.stroke_color

VariableModifier.terminals

The list of terminals of the component.

VariableModifier.width

The width of the mobject.

_construct() None

Construct the shape of the component.

Code to build the component’s symbol goes in here and not in __init__() (contrary to Manim’s standard). This is because the base Component class has to perform initialisation both before (to set up the groups etc.) and after (to set the anchor positions for annotations) the component’s shape setup.