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

Function appearsBy

packages/cli/src/utils/motionAudit.ts:80–98  ·  view source on GitHub ↗
(frames: MotionFrame[], selector: string, bySec: number)

Source from the content-addressed store, hash-verified

78}
79
80function appearsBy(frames: MotionFrame[], selector: string, bySec: number): LayoutIssue[] {
81 if (!everMatched(frames, selector)) return [missingIssue(selector, 0)];
82 const appear = firstAppear(frames, selector);
83 if (appear && appear.time <= bySec) return [];
84 return [
85 {
86 code: "motion_appears_late",
87 severity: "error",
88 time: appear ? appear.time : bySec,
89 selector,
90 message: appear
91 ? `appears at ${round(appear.time)}s but should be visible by ${round(bySec)}s (check its entrance reveal fires under seek)`
92 : `never reaches visible opacity but should be visible by ${round(bySec)}s (check its entrance reveal fires under seek)`,
93 rect: appear ? appear.rect : ZERO_RECT,
94 fixHint:
95 "The renderer seeks a paused timeline; a forward-only reveal can be skipped. Ensure the entrance is applied at this time, not only played through.",
96 },
97 ];
98}
99
100function before(frames: MotionFrame[], a: string, b: string): LayoutIssue[] {
101 const issues: LayoutIssue[] = [];

Callers 1

evaluateMotionFunction · 0.85

Calls 4

everMatchedFunction · 0.85
missingIssueFunction · 0.85
firstAppearFunction · 0.85
roundFunction · 0.70

Tested by

no test coverage detected