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

Function parseAngle

packages/cli/src/commands/motionShotLayout.ts:52–58  ·  view source on GitHub ↗
(a?: string)

Source from the content-addressed store, hash-verified

50
51/** Parse an angle preset name or "yaw,pitch" degrees into a Camera. */
52export function parseAngle(a?: string): Camera {
53 if (!a) return { yaw: 0, pitch: 0 };
54 const preset = ANGLE_PRESETS[a];
55 if (preset) return { yaw: preset[0], pitch: preset[1] };
56 const [y, p] = a.split(",").map((n) => Number.parseFloat(n));
57 return { yaw: Number.isFinite(y) ? y! : 0, pitch: Number.isFinite(p) ? p! : 0 };
58}
59
60/** Resolve which animated selectors a `--shot --selector SCOPE` should sample.
61 *

Callers 3

runFunction · 0.85
captureMotionPathShotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected