Skip to contents

An axis-aligned cube (or rectangular prism) composed of 6 face submobjects.

Public fields

side_length

Side length of the cube

face_colors

Colors for each face

Methods

Inherited methods


Method new()

Create a Cube

Usage

Cube$new(
  side_length = 2,
  color = BLUE,
  fill_opacity = 0.8,
  face_colors = NULL,
  ...
)

Arguments

side_length

Length of each side

color

Base color (all faces)

fill_opacity

Opacity

face_colors

Optional vector of 6 colors for each face

...

Additional args


Method get_face()

Get a specific face (1-6)

Usage

Cube$get_face(i)

Arguments

i

Face index


Method clone()

The objects of this class are cloneable with this method.

Usage

Cube$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.