Skip to content
xrkit — the geometry

xrkit — the geometry

xrkit — the geometry

github.com/go-xrkit/xrkit

The geometry an immersive video player and an XR virtual desktop need, and nothing else: orientation, how a frame packs two eyes, the projections that turn a flat frame into a world you can look around in, the band screens sit on, and a catalogue of what a given headset can actually show.

CGO_ENABLED=0. 100% statement coverage, gated in CI — 171 functions, 100.0% under both go1.26.4 and go1.27.1. The toolchain belongs beside the figure: Go 1.27 counts more statements per block than 1.26, so the same code can read differently under the two compilers. A gate on the TOTAL is the exposed shape; this one survives because everything is covered, and when every statement is covered the weights cannot matter. The geometry packages have no dependencies at all; glasses uses HCL so a person can add their own hardware without a rebuild.

Every package is testable with no headset attached, which is the point. Sign and axis-order mistakes are invisible in a still frame and awful to wear, so they are pinned by tests against known directions rather than discovered by putting the glasses on.

The six packages

Each is described in full on the Packages page.

PackagePurpose
posequaternions, the Euler convention head trackers report, recentring, smoothing
stereohow a frame packs two eyes — mono, side-by-side, top-bottom
projectionflat / equirectangular (360×180, VR180 180×180) / equidistant fisheye
warpthe projection precomputed into a lookup table
ribbonscreens on a 360° band, composited by yaw — and the gallery that shows them all at once
glasseswhich display is the headset, and how wide the view is
headflowwhere the yaw comes from — recovered from the camera’s own frames

Who consumes it

player, desk and android. xrkit knows about none of them, and knows no operating system at all.

What it does not claim

The glasses catalogue grades every entry Observed, Enumerated or Published, and an entry whose figure cannot be sourced carries none — because a wrong field of view renders everything in the wrong place with no symptom. No macOS display-name artifact has been read for any model yet.