(frames: MotionFrame[], selector: string, bySec: number)
| 78 | } |
| 79 | |
| 80 | function 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 | |
| 100 | function before(frames: MotionFrame[], a: string, b: string): LayoutIssue[] { |
| 101 | const issues: LayoutIssue[] = []; |
no test coverage detected