an.timing.flat#
The authored flat timeline: (start, end, address, change) rows.
The upper of the kernel’s two canonical levels (core study §2.4). Every authoring
front-end — an’s combinators, a keyframe sequence, Manim-style beats, recipes —
lowers to this list with absolute seconds, and a compiler lowers it to the
compiled form (an.timing.timeline). It is what timeline.schema.json
describes and what a package that copies an’s track format (shaping)
validates against.
A change is set (a value from start on) or tween (from an
optional from — absent means “from whatever the property has at start” —
to to, through an easing). Genre actions (a play, an expression)
are not changes: a genre lowers them before this level.
>>> from types import SimpleNamespace as NS
>>> rows = [NS(start=0.0, end=1.0, action=NS(kind="tween", target="charlie/left_arm",
... property="rotation", to_value=0.5, from_value=None, easing="ease_in_out"))]
>>> flat_timeline_doc(rows)["actions"]
[{'start': 0.0, 'end': 1.0, 'address': 'charlie/left_arm:rotation', 'change': {'kind': 'tween', 'to': 0.5, 'easing': 'ease_in_out'}}]
Module Attributes
The document's self-description ( |
Functions
|
The |
|
A |
Exceptions
A flat action is not a |
- an.timing.flat.FLAT_TIMELINE_FORMAT: str = 'an.timeline'#
The document’s self-description (
{kind, version}envelope, core study §2.1).
- exception an.timing.flat.UnsupportedChangeError[source]#
Bases:
ValueErrorA flat action is not a
setor atween(a genre action not yet lowered).
- an.timing.flat.change_of(action, *, default_easing=None)[source]#
The
changeof one leaf action (any object with the IR’s attribute names).A tween’s easing is written RESOLVED and always (
nullis linear): the tween’s own, elsedefault_easing(the scene’smeta.default_easing), else the IR default — the precedenceTweenAction.resolved_easingstates, so the flat document says what compiles (an#166).
- an.timing.flat.flat_timeline_doc(flat_actions, *, duration=None, default_easing=None, skip_other=False)[source]#
A
timeline.schema.jsondocument from flat actions.Each item has
start,endand a leafactionwithkind,target,propertyand the change’s values — the shape ofan.ir.compose.flatten’s output, read by attribute so this module does not import the IR.default_easingis the scene’smeta.default_easing.skip_otherdrops non-change actions instead of raising.