templates¶
- class janim.timeline.templates.SourceTimeline(*args, **kwargs)¶
Bases:
TimelineCompared to
Timeline, this will display the source code in the background.- source_object() object¶
- build(*, quiet=False, hide_subtitles=False, show_debug_notice=False) BuiltTimeline¶
Build the animation and return it
- class janim.timeline.templates.ListedTimelines(*args, **kwargs)¶
Bases:
TimelineSpecify a group of
Timelineimplementations and play them in sequenceExample:
class Section0(Timeline): def construct(self): ... class Section1(Timeline): def construct(self): ... class Section2(Timeline): def construct(self): ... class Sections(ListedTimelines): includes = [Section1, Section2]
- construct()¶
- class janim.timeline.templates.AboveTimelines(*args, **kwargs)¶
Bases:
ListedTimelinesPlay all
Timelineimplementations previously defined in the same file, in orderExample:
class Section0(Timeline): def construct(self): ... class Section1(Timeline): def construct(self): ... class Section2(Timeline): def construct(self): ... class Sections(AboveTimelines): pass
You can additionally use
excludesto specify excluded itemsExample:
... class Sections(AboveTimelines): excludes = [Section0]
- construct()¶