data¶
- class janim.utils.data.ContextSetter(ctx: ContextVar[T], val: T)¶
Bases:
Generic
- class janim.utils.data.Array(*, dtype=<class 'numpy.float32'>)¶
Bases:
objectEnsures that the id is different after modifying (assigning) with
.data = xxx.And the numpy array obtained through
.datais always read-only.- len() int¶
- property data: ndarray¶
- class janim.utils.data.AlignedData(data1: T, data2: T, union: T)¶
Bases:
GenericStructure after data alignment, used for
align_for_interpolate()- data1: T¶
- data2: T¶
- union: T¶
- class janim.utils.data.Margins(buff: float | tuple[float], /)¶
- class janim.utils.data.Margins(left: float, top: float, right: float, bottom: float, /)
Bases:
objectDefines a set of four margins: left, top, right, bottom, used to describe the size of the border around a rectangle.
If a single value is passed directly, it represents the value for all four directions.
- property left: float¶
- property top: float¶
- property right: float¶
- property bottom: float¶