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

Function buildMotionSampleTimes

packages/cli/src/commands/layout.ts:63–68  ·  view source on GitHub ↗
(duration: number)

Source from the content-addressed store, hash-verified

61}
62
63function buildMotionSampleTimes(duration: number): number[] {
64 if (!Number.isFinite(duration) || duration <= 0) return [];
65 const count = Math.min(MOTION_MAX_SAMPLES, Math.max(2, Math.ceil(duration * MOTION_FPS) + 1));
66 const step = duration / (count - 1);
67 return Array.from({ length: count }, (_, index) => Math.round(index * step * 1000) / 1000);
68}
69
70async function getCompositionDuration(page: import("puppeteer-core").Page): Promise<number> {
71 return page.evaluate(() => {

Callers 1

runMotionPassFunction · 0.85

Calls 1

fromMethod · 0.80

Tested by

no test coverage detected