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

Function ghostAlphas

packages/cli/src/commands/motionShotLayout.ts:104–112  ·  view source on GitHub ↗
(n: number)

Source from the content-addressed store, hash-verified

102 * the newest frame solid, so the composite of real painted frames reads as a
103 * motion trail leading to the final pose. One alpha in [0,1] per sample. */
104export function ghostAlphas(n: number): number[] {
105 if (n <= 0) return [];
106 if (n === 1) return [1];
107 const lo = 0.14;
108 return Array.from(
109 { length: n },
110 (_, i) => Math.round((lo + (1 - lo) * (i / (n - 1))) * 1000) / 1000,
111 );
112}
113
114/** Scale+centre transform that fits `pts` into a W×H frame (with padding). */
115export function fitTransform(

Callers 2

captureGhostOnionSkinFunction · 0.85

Calls 1

fromMethod · 0.80

Tested by

no test coverage detected