Skip to contents

Container for mixed MObjects (not necessarily VMobjects).

Super class

manimR::MObject -> Group

Public fields

submobjects

List of child MObjects

Methods

Inherited methods


Method new()

Create a new Group

Usage

Group$new(...)

Arguments

...

MObjects to include


Method add()

Add objects to the group

Usage

Group$add(...)

Arguments

...

MObjects to add


Method remove()

Remove an object from the group

Usage

Group$remove(obj)

Arguments

obj

MObject to remove


Method length()

Get number of objects

Usage

Group$length()


Method [[()

Access submobject by index

Usage

Group$[[(i)

Arguments

i

Index (1-based)


Method set_color()

Set color on all children

Usage

Group$set_color(color)

Arguments

color

New color


Method set_opacity()

Set opacity on all children

Usage

Group$set_opacity(opacity)

Arguments

opacity

New opacity


Method move_to()

Move all children

Usage

Group$move_to(point)

Arguments

point

Target position


Method shift()

Shift all children

Usage

Group$shift(direction)

Arguments

direction

Shift vector


Method get_center()

Get center of all children's bounding boxes

Usage

Group$get_center()


Method get_bounding_box()

Get bounding box enclosing all children

Usage

Group$get_bounding_box()


Method arrange()

Arrange children in a row or column

Usage

Group$arrange(direction = RIGHT, buff = MED_SMALL_BUFF, center = TRUE)

Arguments

direction

Arrangement direction (RIGHT for row, DOWN for column)

buff

Space between objects

center

Whether to center the arrangement at the group's position


Method arrange_in_grid()

Arrange children in a grid

Usage

Group$arrange_in_grid(n_cols = 3, buff = MED_SMALL_BUFF)

Arguments

n_cols

Number of columns

buff

Space between objects


Method clone()

The objects of this class are cloneable with this method.

Usage

Group$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.