typing

class janim.typing.SupportsApartAlpha(*args, **kwargs)

Bases: Protocol

apart_alpha(n: int) None
class janim.typing.SupportsAnim(*args, **kwargs)

Bases: Protocol

Objects that can be passed to AnimGroup must implement __anim__

Because objects passed to AnimGroup fall into two types:

  • Itself is an Animation object

  • Has a __anim__ method that returns an Animation object when called

Since Animation implements __anim__ returning itself, SupportsAnim is used as a collective name and is normalized by AnimGroup._get_animation_objects

class janim.typing.SupportsTracking(*args, **kwargs)

Bases: Protocol

Defines object types that can be directly tracked by Cmpt_Data

For objects that do not implement these methods, use register_funcs() to define the three methods for that type

copy() Self
not_changed(other: Self) bool
interpolate(other: Self, alpha: float) Self
janim.typing.t_(*x: str) Any

Provided for the janim-toolbox VS Code extension to mark strings that need Typst highlighting