Featured Developer Sponsor • Zero-Token Protection
W3C Recommendation
Spatial Computing
WebXR Device API & Spatial Anchors Studio
Interactive spatial computing simulator modeling WebXR 6-DOF tracking, stereo projection matrices, floor reference frames, and persistent AR anchors.
56 mm
64 mm
74 mm
-180°
+15°
+180°
6-DOF Pose Origin
(0.00, 1.65, 0.00)
Eye height Y=1.65m above floor
Stereo Eye Offsets
±32.0 mm
Left: -0.032m | Right: +0.032m
Spatial Anchors Pinned
2 Anchors Active
SLAM drift compensated
Hit-Test Surface Ray
Intersecting Floor
Hit distance: 2.14 meters
WebXR Spatial Tracking & Stereo View Frustum
W3C WebXR Session Loop Code
Stereo View & 4x4 Projection Matrices
Frequently Asked Technical Questions
How does the WebXR Device API handle 6-DOF spatial tracking across headsets and mobile AR?+
The WebXR Device API provides uniform access to 6 Degrees of Freedom (6-DOF: 3 axes of translation X, Y, Z, and 3 axes of rotation pitch, yaw, roll) via XRViewerPose and XRPose objects obtained on each XRFrame. The underlying runtime (e.g. OpenXR on Meta Quest / Apple Vision Pro, ARCore on Android, or ARKit on Safari) runs Simultaneous Localization and Mapping (SLAM) with visual-inertial odometry (VIO) to update the head pose relative to an XRReferenceSpace.
What is the difference between local, local-floor, and unbounded reference spaces?+
An XRReferenceSpace establishes the coordinate frame origin. In "local", the origin is centered near the viewer at session creation, ideal for seated VR experiences. In "local-floor", the origin is pinned to the physical floor directly below the user (y = 0 at ground level), essential for standing room-scale experiences. In "unbounded", the origin allows free roaming through buildings or outdoors without coordinate recentering, used in warehouse-scale AR.
How do WebXR Spatial Anchors prevent virtual objects from drifting in AR?+
As SLAM algorithms explore an environment, loop closure corrections cause previous coordinate estimates to adjust, leading to visual "drift" or sliding of virtual models placed in world coordinates. The WebXR Anchors API (frame.createAnchor) instructs the underlying native AR engine to continuously adjust the anchor pose to remain locked to physical real-world features and detected plane boundaries.
How does WebXR compute stereo projection matrices for left and right eyes?+
Each XRView in pose.views provides an eye property ("left" or "right"), a transform matrix offset by half the user's Interpupillary Distance (IPD / 2), and a projectionMatrix computed from the headset's asymmetric field-of-view (FOV: up, down, left, right angles). Applications render the 3D scene twice per frame (or use multiview extensions OVR_multiview2) into the XRWebGLLayer framebuffer.
Sponsored Utility
While You're Here
Sponsored Recommendations
Advertisement