How the window works

The 3D camera sits where your eye is and keeps looking straight at the screen. Its view is cut to the exact rectangle of the screen (an off-axis, or asymmetric, projection), so the edges of the page stay put and everything behind them shifts the way it would through real glass. Things near the frame slide a lot; the hills outside barely move.

Your eye position comes from one of four places, in this order: your face through the camera (only after you press Enable window mode), your phone's tilt, your mouse, or nothing at all if your system asks for reduced motion.

Privacy

The camera is off when the page loads. Face tracking runs inside this tab using MediaPipe in WebAssembly. No video, frames or face points leave the page, nothing is recorded, and there is no analytics. Turn off camera stops the camera completely.

Drop it on a page

<div id="hero"></div>
<script type="module"
  src="https://cdn.jsdelivr.net/gh/chasebuilds/window-hero@v1.0.0/src/window-hero.js"
  data-title="Your headline"
  data-text="One or two sentences."
  data-cta-text="Book a call"
  data-cta-href="/contact"></script>