templates¶
- class janim.timeline.templates.SourceTimeline(*args, **kwargs)¶
基类:
Timeline与
Timeline相比,会在背景显示源代码- source_object() object¶
- build(*, quiet=False, hide_subtitles=False, show_debug_notice=False) BuiltTimeline¶
构建动画并返回
- class janim.timeline.templates.ListedTimelines(*args, **kwargs)¶
基类:
Timeline指定一组
Timeline实现,将他们依次播放示例:
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)¶
-
依次播放在同文件中先前定义过的所有
Timeline实现示例:
class Section0(Timeline): def construct(self): ... class Section1(Timeline): def construct(self): ... class Section2(Timeline): def construct(self): ... class Sections(AboveTimelines): pass
可另外使用
excludes指定排除项示例:
... class Sections(AboveTimelines): excludes = [Section0]
- construct()¶