Skip to content

useViewport()

const { width, height, scaleFactor, isFullscreen } = useViewport(1920, 1080)

Recomputes on resize and fullscreenchange. scaleFactor = min(window.w / width, window.h / height).