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

Function isOffFrame

packages/cli/src/utils/motionAudit.ts:126–133  ·  view source on GitHub ↗
(r: LayoutRect, canvas: Canvas)

Source from the content-addressed store, hash-verified

124}
125
126function isOffFrame(r: LayoutRect, canvas: Canvas): boolean {
127 return (
128 r.left < -FRAME_TOLERANCE ||
129 r.top < -FRAME_TOLERANCE ||
130 r.right > canvas.width + FRAME_TOLERANCE ||
131 r.bottom > canvas.height + FRAME_TOLERANCE
132 );
133}
134
135// Note: off-frame check uses sample.visible (opacity ≥ 0.2 from the browser sampler);
136// the first-appear anchor uses APPEAR_OPACITY (0.5). Elements fading in between those

Callers 1

staysInFrameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected