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

Function printTween

packages/cli/src/commands/keyframes.ts:584–600  ·  view source on GitHub ↗
(t: SurfacedTween)

Source from the content-addressed store, hash-verified

582}
583
584function printTween(t: SurfacedTween): void {
585 const timing = c.dim(`@${t.start}s→${t.end}s (${t.duration}s)`);
586 const group = t.group ? c.dim(` ${t.group}`) : "";
587 console.log(` ${c.accent(t.target)}${group} ${c.dim(t.method)}/${t.shape} ${timing}`);
588 if (t.shape === "motionPath") {
589 console.log(c.dim(` motionPath arc (${t.keyframes.length} stops)`));
590 } else {
591 const kfLine = t.keyframes.map((k) => `${k.pct}% {${fmtProps(k.properties)}}`).join(" ");
592 console.log(` ${c.dim(kfLine)}`);
593 }
594 if (t.composedWith?.length) {
595 for (const a of t.composedWith) {
596 console.log(c.dim(` ↑ composed with ${c.accent(a.selector)}${c.dim(": " + a.summary)}`));
597 }
598 }
599 console.log();
600}
601
602function printTrace(tr: SurfacedTrace): void {
603 const start = Math.min(...tr.strokes.map((s) => s.start));

Callers 1

printCompositionTweensFunction · 0.85

Calls 1

fmtPropsFunction · 0.85

Tested by

no test coverage detected