(cmp: SurfacedComposition)
| 792 | // Print tweens not already shown as part of a trace (a drawn stroke, or its |
| 793 | // internal pen-up jump). |
| 794 | function 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). |
| 805 | function printComposition(cmp: SurfacedComposition): void { |
no test coverage detected