MArrayElement#

Qualified name: manim\_data\_structures.array.MArrayElement

class manim_data_structures.array.MArrayElement(mob_square_args: dict = {}, mob_value_args: dict = {}, mob_index_args: dict = {}, index_pos: ndarray = array([0., 1., 0.]), index_gap: float = 0.25, next_to_mob: Optional[MArrayElement] = None, next_to_dir: ndarray = array([1., 0., 0.]), **kwargs)#

Bases: VGroup

A class that represents an array element.

Parameters#

mob_square_argsdict, default: {}

Arguments for manim.Square that represents the element body.

mob_value_argsdict, default: {}

Arguments for manim.Text that represents the element value.

mob_index_argsdict, default: {}

Arguments for manim.Text that represents the element index.

index_posnp.ndarray, default: UP

Specifies the position of __mob_index

index_gapfloat, default: 0.25

Specifies the distance between __mob_square and __mob_index

next_to_mobMArrayElement, default: None

Specifies placement for __mob_square

next_to_dirnp.ndarray, default: RIGHT

Specifies direction of placement for __mob_square

Attributes#

__mob_square_propsdict

Default arguments passed to manim.Square that represents the element body.

__mob_value_propsdict

Default arguments passed to manim.Text that represents the element value.

__mob_index_propsdict

Default arguments passed to manim.Text that represents the element index.

__mob_squaremanim.Square

manim.Mobject that represents the element body.

__mob_valuemanim.Text

manim.Mobject that represents the element index.

__mob_indexmanim.Text

manim.Mobject that represents the element value.

__index_posnp.ndarray

Specifies the position of __mob_index

__index_gapfloat

Specifies the distance between __mob_square and __mob_index

Methods

animate_mob_index

Invokes the manim.Text.animate() property of manim.Text for the element index.

animate_mob_square

Invokes the manim.Square.animate() property of manim.Square for the element body.

animate_mob_value

Invokes the manim.Text.animate() property of manim.Text for the element value.

fetch_mob_index

Fetches the manim.Text that represents the element index.

fetch_mob_square

Fetches the manim.Square that represents the element body.

fetch_mob_value

Fetches the manim.Text that represents the element value.

update_mob_index

Re-intializes the manim.Text that represents the element index.

update_mob_value

Re-intializes the manim.Text that represents the element value.

Inherited Attributes

animate

Used to animate the application of any method of self.

color

depth

The depth of the mobject.

fill_color

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

height

The height of the mobject.

sheen_factor

stroke_color

width

The width of the mobject.

animate_mob_index() _AnimationBuilder#

Invokes the manim.Text.animate() property of manim.Text for the element index.

Returns#

_AnimationBuilder

Value returned by manim.Text.animate() property of manim.Text.

animate_mob_square() _AnimationBuilder#

Invokes the manim.Square.animate() property of manim.Square for the element body.

Returns#

_AnimationBuilder

Value returned by manim.Square.animate() property of manim.Square.

animate_mob_value() _AnimationBuilder#

Invokes the manim.Text.animate() property of manim.Text for the element value.

Returns#

_AnimationBuilder

Value returned by manim.Text.animate() property of manim.Text.

fetch_mob_index() Text#

Fetches the manim.Text that represents the element index.

Returns#

manim.Text

Represents the element index.

fetch_mob_square() Square#

Fetches the manim.Square that represents the element body.

Returns#

manim.Square

Represents the element body.

fetch_mob_value() Text#

Fetches the manim.Text that represents the element value.

Returns#

manim.Text

Represents the element value.

update_mob_index(mob_index_args: dict = {}) Text#

Re-intializes the manim.Text that represents the element index.

Parameters#

mob_index_argsdict, default: {}

Arguments for manim.Text that represents the element index.

Returns#

manim.Text

Represents the updated element index.

update_mob_value(mob_value_args: dict = {}) Text#

Re-intializes the manim.Text that represents the element value.

Parameters#

mob_value_argsdict, default: {}

Arguments for manim.Text that represents the element value.

Returns#

manim.Text

Represents the updated element value.