SegmentWindow¶
Qualified name: algan.animation\_timeline.timeline.SegmentWindow
- class SegmentWindow(rows, endpoints, index0, index1, weights, cache_key)[source]¶
Bases:
objectOne mob’s rows of one attribute over one frame window, described as endpoint states plus per-frame interpolation instead of a materialized
[T, rows, C]buffer.Produced by
AnimationTimeline._describe_segment_windows()for attributes that opted in (AnimationTimeline.enable_segment_windows()) when the window’s writers are all plain recorded assignments – currentlySurface.color_texture, whose per-frame materialization is a whole image. Framet’s state isendpoints[index0[t]] + (endpoints[index1[t]] - endpoints[index0[t]]) * weights[t]; the weights are the exact per-frame rate-function values the dense replay would have computed (same tensors, same ops, same shapes), so the only difference from the dense buffer is the lerp’s re-association ((post - pre) * aagainst the replay’schange * a) – at most an ulp per texel, which is why the consumer’s flip is a qualified exception rather than byte-identical.cache_keyidentifies the endpoint stack across batches (it is a tuple over the edit records the endpoints came from), so consumers can reuse per-stack work (u8 provenance, the stacked upload) while the same animation spans several frame windows. It isNonewhen an endpoint was read from the mutable current state (the window runs past the last edit), which must not be cached.Methods
The window's dense
[T, rows, C]state, for fallback fills.Attributes
rowsendpointsindex0index1weightscache_key- evaluate()[source]¶
The window’s dense
[T, rows, C]state, for fallback fills.Only the escape hatch reads this (an updater discovering the mob mid-window, see
AnimationTimeline.trace_updater_mob_access()); ordinary consumption samples the endpoints in the render kernel.