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

Function firstAppear

packages/cli/src/utils/motionAudit.ts:55–66  ·  view source on GitHub ↗

First frame where the selector is visible at/above the appear threshold.

(
  frames: MotionFrame[],
  selector: string,
)

Source from the content-addressed store, hash-verified

53
54/** First frame where the selector is visible at/above the appear threshold. */
55function firstAppear(
56 frames: MotionFrame[],
57 selector: string,
58): { time: number; rect: LayoutRect } | null {
59 for (const frame of frames) {
60 const sample = frame.data[selector];
61 if (sample && sample.visible && sample.opacity >= APPEAR_OPACITY) {
62 return { time: frame.time, rect: sample.rect };
63 }
64 }
65 return null;
66}
67
68function missingIssue(selector: string, time: number): LayoutIssue {
69 return {

Callers 3

appearsByFunction · 0.85
beforeFunction · 0.85
staysInFrameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected