This crate defines the Rust API for WebXR. It is implemented by the
Traits to be implemented by backends
This crate uses
euclid’s typed units, and exposes different coordinate spaces.
A stand-in type for “the space isn’t statically known since it comes from client side code”
, but better
The per-frame data that is provided by the device. https://www.w3.org/TR/webxr/#xrframe
The coordinate space of a hit test result
Receiving end of a channel using serialized messages.
Sending end of a channel using serialized messages.
An object that represents an XR session. This is owned by the content thread. https://www.w3.org/TR/webxr/#xrsession-interface
A type for building XR sessions
For devices that want to do their own thread management, the
SessionThreadtype is exposed.
Pattern-match on eyes
For each eye, the pose of that eye, its projection onto its display. For stereo displays, we have a
View<RightEye>. For mono displays, we hagve a
A list of viewports per-eye in the order of fields in Views.
The coordinate space of a secondary capture view
The coordinate space of the back frustrum of a cubemap
The coordinate space of the bottom frustrum of a cubemap
The coordinate space of the left frustrum of a cubemap
The coordinate space of the right frustrum of a cubemap
The coordinate space of the top frustrum of a cubemap
The normalized device coordinate space, where the display is from (-1,-1) to (1,1).
Errors that can be produced by XR.
Convenience structure for buffering up events when no event callback has been set
The coordinate space of the floor https://immersive-web.github.io/webxr/#dom-xrreferencespacetype-local-floor
The coordinate space of an input device
The coordinate space of the left eye https://immersive-web.github.io/webxr/#dom-xreye-left
The native 3D coordinate space of the device This is not part of the webvr specification.
The coordinate space of the right eye https://immersive-web.github.io/webxr/#dom-xreye-right
The coordinate space of the viewer https://immersive-web.github.io/webxr/#dom-xrreferencespacetype-viewer
The unnormalized device coordinate space, where the display is from (0,0) to (w,h), measured in pixels.
Whether a device is mono or stereo, and the views it supports.
A trait for using an XR device
A trait for discovering XR devices
Devices that need to can run sessions on the main thread.
A trait for discovering mock XR devices
Create a connected IpcSender and IpcReceiver that transfer messages of a given type privided by type
Tor inferred by the types of messages sent by the sender.