Package-level declarations
Types
Extends XRReferenceSpace to include boundsGeometry, indicating the pre-configured boundaries of the user's space.
Represents an XR input source, which is any input mechanism which allows the user to perform targeted actions in the same virtual space as the viewer. Example XR input sources include, but are not limited to, handheld controllers, optically tracked hands, and gaze-based input methods that operate on the viewer's pose. Input mechanisms which are not explicitly associated with the XR device, such as traditional gamepads, mice, or keyboards SHOULD NOT be considered XR input sources. ref: https://immersive-web.github.io/webxr/#xrinputsource-interface
The XRJointSpace interface is an {@link XRSpace} and represents the position and orientation of an {@link XRHand} joint.
The base class for XRWebGLLayer and other layer types introduced by future extensions. ref: https://immersive-web.github.io/webxr/#xrlayer-interface
One of several common XRSpaces that applications can use to establish a spatial relationship with the user's physical environment.
A transform described by a position and orientation. When interpreting an XRRigidTransform the orientation is always applied prior to the position.
Represents a virtual coordinate system with an origin that corresponds to a physical location. Spatial data that is requested from the API or given to the API is always expressed in relation to a specific XRSpace at the time of a specific XRFrame. Numeric values such as pose positions are coordinates in that space relative to its origin. The interface is intentionally opaque.
An XRPose describing the state of a viewer of the XR scene as tracked by the XR device. A viewer may represent a tracked piece of hardware, the observed position of a user's head relative to the hardware, or some other means of computing a series of viewpoints into the XR scene. XRViewerPoses can only be queried relative to an XRReferenceSpace. It provides, in addition to the XRPose values, an array of views which include rigid transforms to indicate the viewpoint and projection matrices. These values should be used by the application when rendering a frame of an XR scene.
Describes a viewport, or rectangular region, of a graphics surface.
A layer which provides a WebGL framebuffer to render into, enabling hardware accelerated rendering of 3D graphics to be presented on the XR device. * ref: https://immersive-web.github.io/webxr/#xrwebgllayer-interface
Properties
Functions
Queries if a given mode may be supported by the user agent and device capabilities.
Requests that a new XRReferenceSpace of the specified type be created. Returns a promise which resolves with the XRReferenceSpace or XRBoundedReferenceSpace which was requested, or throws a NotSupportedError if the requested space type isn't supported by the device.
Attempts to initialize an XRSession for the given mode if possible, entering immersive mode if necessary.