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

Function ghost

packages/cli/src/commands/motionShotLayout.ts:171–180  ·  view source on GitHub ↗
(corners: Pt[], center: Pt, color: string, opacity: number, f: number)

Source from the content-addressed store, hash-verified

169 s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
170
171const ghost = (corners: Pt[], center: Pt, color: string, opacity: number, f: number): string => {
172 const tickEnd = {
173 x: (corners[0]!.x + corners[1]!.x) / 2,
174 y: (corners[0]!.y + corners[1]!.y) / 2,
175 };
176 return (
177 polygon(corners, color, Math.max(0.08, opacity * 0.42), timeColor(f)) +
178 line(center, tickEnd, timeColor(f), 3, 0.9)
179 );
180};
181
182/** Build the full onion-skin SVG overlay markup from sampled elements. */
183export function buildOnionSvg(elements: OnionElement[], opt: ShotLayoutOptions): string {

Callers 2

pathBodyFunction · 0.85
stripBodyFunction · 0.85

Calls 3

polygonFunction · 0.85
timeColorFunction · 0.85
lineFunction · 0.85

Tested by

no test coverage detected