export type RenderSurface = { draw(time: number): void; dirty: boolean; visible: boolean; ready: boolean; }; export type DisplayClock = { readonly time: number; schedule(): void }; export type ArtEffects = { raster: number; rasterSeed: number; ascii: number }; // IntersectionObserver also reports edge contact; only positive area is visible. export const inViewport = (bounds: DOMRect) => bounds.width > 0 && bounds.height > 0 && bounds.bottom > 0 && bounds.top < innerHeight && bounds.right > 0 && bounds.left < innerWidth;