(r: LayoutRect, canvas: Canvas)
| 124 | } |
| 125 | |
| 126 | function 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 |