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_args
dict
, default: {} Arguments for
manim.Square
that represents the element body.- mob_value_args
dict
, default: {} Arguments for
manim.Text
that represents the element value.- mob_index_args
dict
, default: {} Arguments for
manim.Text
that represents the element index.- index_pos
np.ndarray
, default: UP Specifies the position of
__mob_index
- index_gap
float
, default: 0.25 Specifies the distance between
__mob_square
and__mob_index
- next_to_mob
MArrayElement
, default: None Specifies placement for
__mob_square
- next_to_dir
np.ndarray
, default: RIGHT Specifies direction of placement for
__mob_square
Attributes#
- __mob_square_props
dict
Default arguments passed to
manim.Square
that represents the element body.- __mob_value_props
dict
Default arguments passed to
manim.Text
that represents the element value.- __mob_index_props
dict
Default arguments passed to
manim.Text
that represents the element index.- __mob_square
manim.Square
manim.Mobject
that represents the element body.- __mob_value
manim.Text
manim.Mobject
that represents the element index.- __mob_index
manim.Text
manim.Mobject
that represents the element value.- __index_pos
np.ndarray
Specifies the position of
__mob_index
- __index_gap
float
Specifies the distance between
__mob_square
and__mob_index
Methods
Invokes the
manim.Text.animate()
property ofmanim.Text
for the element index.Invokes the
manim.Square.animate()
property ofmanim.Square
for the element body.Invokes the
manim.Text.animate()
property ofmanim.Text
for the element value.Fetches the
manim.Text
that represents the element index.Fetches the
manim.Square
that represents the element body.Fetches the
manim.Text
that represents the element value.Re-intializes the
manim.Text
that represents the element index.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 ofmanim.Text
for the element index.Returns#
_AnimationBuilder
Value returned by
manim.Text.animate()
property ofmanim.Text
.
- animate_mob_square() _AnimationBuilder #
Invokes the
manim.Square.animate()
property ofmanim.Square
for the element body.Returns#
_AnimationBuilder
Value returned by
manim.Square.animate()
property ofmanim.Square
.
- animate_mob_value() _AnimationBuilder #
Invokes the
manim.Text.animate()
property ofmanim.Text
for the element value.Returns#
_AnimationBuilder
Value returned by
manim.Text.animate()
property ofmanim.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.
- mob_square_args