display¶
- class janim.anims_core.display.DisplayType(*args, **kwargs)¶
Bases:
StackableAnimationThe base class used for type checking and
isinstancechecks
- class janim.anims_core.display.Display(data: Item, **kwargs)¶
Bases:
DisplayTypeUsed to mark the data of an item in a specific time-range
As the result of
display(), it indicates that “the item has been changed to this data starting from a specific time”See also:
detect_changes_of_all()- apply(params: ApplyParams) None¶
Initializes item data for
paramsResets
self.datato the data ofself.data_origand sets it toparams.datato prevent the original data from being accidentally modifiedSpecial case:
When the animation stack of
AnimStackcontains only one animation, which is this type of animation, this method is skipped anddata_origis accessed directly, providing a small optimization
- class janim.anims_core.display.DelayedDisplay(item: Item, func: Callable[[DelayedDisplayParams], Item], **kwargs)¶
Bases:
DisplayTypeBasically the same as
Display, but it only calls thefuncfunction to set thedatastate after the global timeline time reaches.t_range.at- Parameters:
item – The item to which the state is applied
func – The callback function invoked after the global time reaches
.t_range.at. It must return anItemas the item state
- apply(params: ApplyParams) None¶
For details, see the descriptions of
StackableAnimationandApplyParams
- class janim.anims_core.display.DelayedDisplayParams(is_latest_display: 'bool')¶
Bases:
object- is_latest_display: bool¶
- class janim.anims_core.display.DoBecomeAtEnd(item: Item, end: float, **kwargs)¶
Bases:
DelayedDisplayA wrapper around
DelayedDisplaythat implements thebecome_at_endparameter for each animationThat is, it is registered for the
end~FOREVERinterval and uses the animation state calculated before theendtime as the display state; it also automatically callsrestore()whenis_latest_display=True