Interface and input
XR
44 symbols, imported from @driftengine/xr.
Explained in XR.
Classes
HandSkeleton- One hand's joints, allocated once and written into every frame.
Interfaces
ControllerState- One controller, as much of it as this engine reads.
EnterXrOptionsEyeView- One eye's matrices and where it draws.
LayerSources- What a caller offers. Whichever of the two it has; both is allowed and neither is not.
XrCompatibleContext- A context that can be asked to become XR compatible: what
probeXrSupportlooks for on the object it is handed. XrFrameXrGamepadXrHandXrInputSourceXrJointPose- A joint of a hand, keyed by the twenty-five names the specification fixes.
XrLayerXrRigidTransform- A pose's transform. Only the matrix is read; the decomposed parts are the runtime's convenience.
XrRunXrSessionXrSupportXrSystemXrView- One eye, or the single view an inline session offers.
XrViewerPoseXrViewport- Where in the layer's texture one eye draws.
XrWebGlLayer
Functions
aimCameraAtEye- Point a camera at one eye.
bestMode- The best mode this support answer allows, or null when none is worth asking for.
buttonPressed- Whether a named button is pressed, false where the device has no such button.
buttonValue- One named button's analogue value, or zero where the device has no such button.
chooseLayer- Build the layer this session and these sources allow.
controllerFor- The first source for a hand, or null. Two sources may share a handedness and rarely do.
enterXr- Ask for a session and set everything up behind it.
eyeViews- Turn a pose's views into eye views, into reused storage.
jointPosition- A joint's position, read out of the flat storage without allocating.
probeXrSupport- Ask, and try the step that lies.
readControllerreadControllers- Read every input source a session currently reports.
readHand- Read one hand into a skeleton.
Types
EnterXrResultHandedness- Which hand, as WebXR reports it.
noneis a source with no handedness, like a gaze pointer. HandJointLayerBackendXrButtonXrMode- The session modes this package will ask for.
Constants
HAND_JOINTS- Every joint WebXR defines, in the order this engine indexes them.
JOINT_COUNTJOINT_INDEX- The index of a named joint, so a consumer never counts.
XR_BUTTON- The buttons the WebXR gamepad profile fixes, in its order.