Skip to main content

Interface: WebXRProviderContext

Defined in: threejs-interactions/src/webxr-provider.ts:35

Extended by

Properties

PropertyTypeDescriptionDefined in
cameraCameraThe rendering camera - head pose in XR, pointer projection on desktop.threejs-interactions/src/webxr-provider.ts:39
desktopGripDistance?numberMetres along the mouse ray at which the desktop fallback places its synthetic grip pose. Hand-driven behaviours (grab, hinge, dial, slide) track a grip position; a mouse has none, so one is projected onto the ray. Set this near the distance of the things being manipulated - too short and levers barely swing, too long and they over-swing. Default 1 metre.threejs-interactions/src/webxr-provider.ts:49
desktopSqueezeButton?"none" | "left" | "right"Which mouse button reports squeeze on desktop. Default "left". The right button is NOT the default, because the shared desktop camera controls (DesktopControls in @realitycollective/xrblocks-uiextensions) bind right-drag to look and reserve the left button for interaction. That leaves the left button to carry both actions, which is fine as long as an interactable does not mix a select-driven behaviour (press) with a grab-driven one (grab, hinge, dial, slide) - such an interactable would receive both on a single click. Use "right" only in an app that does not use right-drag to look.threejs-interactions/src/webxr-provider.ts:62
domElement?HTMLElementDOM element for the desktop mouse fallback (canvas). Omit to disable.threejs-interactions/src/webxr-provider.ts:41
xrPick<WebXRManager, "getSession" | "getReferenceSpace" | "getFrame">three.js renderer.xr (or anything with the same session surface).threejs-interactions/src/webxr-provider.ts:37