mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-14 13:27:13 +00:00
primeAnimeInstance() seeks every registered timeline to its full duration and back to 0 at registration time, purely to force lazily-rendered CSS onto elements before the composition's first real seek. anime.js fires tl.call()/onComplete callbacks as a side effect of any seek that crosses their position, including this internal priming seek -- so a composition using tl.call() (or a raw onComplete tween) renders as if it had already reached that callback's end state from frame 0 onward, regardless of the time actually requested later. anime.js's own Timer.prototype.seek(time, muteCallbacks) already suppresses onBegin/onComplete/onUpdate/onLoop/onRender for a given seek; pass true on both priming seeks instead of reimplementing that suppression. Widened RuntimeAnimeInstance.seek to accept the optional second argument. Confirmed against liquid-glass-widgets (a tl.call() status-text swap scheduled at t=5.2s was rendering already-fired at t=1.434s) and flowchart/flowchart-vertical (their addTimelineCall()/onComplete helper had the whole diagram, cursor, and text-correction sequence visible from frame 0). Added a regression test exercising the same tl.call()-during-priming scenario directly against the adapter.