
Used WebXR immersive-ar as an absolute pointing device for a desktop — two-ray corner calibration, One Euro filter, WebRTC to the PC
A slightly unusual application of immersive-ar: rather than rendering anything, I'm using the WebXR pose purely as a tracking source to drive a desktop mouse cursor absolutely — a software lightgun for PC rail shooters like Time Crisis.
The parts that might interest this sub:
Two-ray corner calibration. The user points at three screen corners; two rays per corner define the screen plane without needing hit-test or surface tracking, so it works on any display — no markers, no QR targets stuck to the monitor. WebXR anchors then keep the calibration self-correcting as ARCore refines its map of the room.
Zero certificates for the wireless flow. This is normally the worst part of any local WebXR project. Here the phone page is served over HTTPS from GitHub Pages, signaling is a single Local Network Access fetch (Chrome 142+), and WebRTC brings its own encryption. Run an executable on the PC, it prints a QR, you scan it and tap one permission prompt. No self-signed certs, no chrome://flags, no accounts.
Latency discipline. One Euro filter phone-side, then a 2ms newest-wins cursor loop on the PC, and deliberately no prediction or lookahead — the cursor is exactly where the phone last said the aim was. It ships live p50/p95 jitter stats so the claim is checkable rather than just asserted.
Roughly 15-30ms phone-side. The interesting result for me was that 6DoF VIO is dramatically better for this than the gyro-based approaches people have tried before: because the camera continuously corrects the IMU, there's no yaw drift and no recentering. You aim at a spot and hit that spot, session after session.
TypeScript throughout, Node 23.6+ with native type stripping so there's no build step in the dev loop.
Code (MIT): https://github.com/ggcaponetto/point-bang
Architecture/protocol docs: https://ggcaponetto.github.io/point-bang/reference/architecture
Demo: https://youtu.be/UE3XUln_xOE
Happy to go into the calibration maths if anyone wants it. I'd also be curious whether anyone has pushed anchors harder than this for long-session stability — that's the part I'd most like to improve.