MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / printCompositionTweens

Function printCompositionTweens

packages/cli/src/commands/keyframes.ts:794–802  ·  view source on GitHub ↗
(cmp: SurfacedComposition)

Source from the content-addressed store, hash-verified

792// Print tweens not already shown as part of a trace (a drawn stroke, or its
793// internal pen-up jump).
794function printCompositionTweens(cmp: SurfacedComposition): void {
795 const tracedIds = new Set(cmp.traces.flatMap((tr) => tr.strokes.map((s) => s.id)));
796 const tracedTargets = new Set(cmp.traces.map((tr) => tr.target));
797 for (const t of cmp.tweens) {
798 if (tracedIds.has(t.id)) continue; // already shown as part of its trace
799 if (t.method === "set" && tracedTargets.has(t.target)) continue; // internal pen-up jump
800 printTween(t);
801 }
802}
803
804// Print one composition's traces + tweens (skipping strokes already shown in a trace).
805function printComposition(cmp: SurfacedComposition): void {

Callers 1

printCompositionFunction · 0.85

Calls 1

printTweenFunction · 0.85

Tested by

no test coverage detected