Skip to content

The open-source full-stack studio for Opus 5.5 motion video. Reverse engineering for any video. Code video with HTML: recreate, edit and render. BYOA + BYOK · Motion.md · Images, Video, Music & Voice.

519 B
Raw Blame
// Test-only IntersectionObserver stand-in: everything observed is reported near the screen, asynchronously.
export function NearScreenIntersectionObserver(callback: IntersectionObserverCallback) {
  const observer = {
    observe(target: Element) {
      queueMicrotask(() =>
        callback(
          [{ isIntersecting: true, target } as IntersectionObserverEntry],
          observer as unknown as IntersectionObserver,
        ),
      );
    },
    unobserve() {},
    disconnect() {},
  };
  return observer;
}