Package-level declarations

Types

Link copied to clipboard
open class XRAnchor
Link copied to clipboard
Link copied to clipboard

Extends XRReferenceSpace to include boundsGeometry, indicating the pre-configured boundaries of the user's space.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface XRDepthDataFormat
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface XRDepthType
Link copied to clipboard
sealed interface XRDepthUsage
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface XRDOMOverlayType
Link copied to clipboard
sealed interface XREnvironmentBlendMode
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface XREye
Link copied to clipboard
open class XRFrame
Link copied to clipboard
Link copied to clipboard
sealed interface XRFrameRequestId
Link copied to clipboard
Link copied to clipboard
sealed interface XRHandedness
Link copied to clipboard
sealed interface XRHandJoint
Link copied to clipboard
interface XRHitResult
Link copied to clipboard
Link copied to clipboard
open class XRHitTestResult
Link copied to clipboard
open class XRHitTestSource
Link copied to clipboard
sealed interface XRHitTestTrackableType
Link copied to clipboard
open class XRInputSource

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

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface XRInteractionMode
Link copied to clipboard
open class XRJointPose : XRPose
Link copied to clipboard
open class XRJointSpace : XRSpace

The XRJointSpace interface is an {@link XRSpace} and represents the position and orientation of an {@link XRHand} joint.

Link copied to clipboard
open class XRLayer : EventTarget

The base class for XRWebGLLayer and other layer types introduced by future extensions. ref: https://immersive-web.github.io/webxr/#xrlayer-interface

Link copied to clipboard
Link copied to clipboard
interface XRLayerInit
Link copied to clipboard
sealed interface XRLayerLayout
Link copied to clipboard
sealed interface XRLayerQuality
Link copied to clipboard
open class XRMediaBinding(sesion: XRSession)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open class XRMesh
Link copied to clipboard
abstract class XRMeshSet : MutableSetLike<XRMesh>
Link copied to clipboard
open class XRPlane
Link copied to clipboard
sealed interface XRPlaneOrientation
Link copied to clipboard
abstract class XRPlaneSet : MutableSetLike<XRPlane>
Link copied to clipboard
open class XRPose

Describes a position and orientation in space relative to an XRSpace.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open class XRRay(transformOrOrigin: XRRigidTransform = definedExternally, direction: DOMPointReadOnly = definedExternally)
Link copied to clipboard

One of several common XRSpaces that applications can use to establish a spatial relationship with the user's physical environment.

Link copied to clipboard
Link copied to clipboard
sealed interface XRReferenceSpaceType
Link copied to clipboard
open class XRRenderState
Link copied to clipboard
Link copied to clipboard
open class XRRigidTransform(position: DOMPointReadOnly = definedExternally, direction: DOMPointReadOnly = definedExternally)

A transform described by a position and orientation. When interpreting an XRRigidTransform the orientation is always applied prior to the position.

Link copied to clipboard
open class XRSession : EventTarget
Link copied to clipboard
Link copied to clipboard
interface XRSessionGrant
Link copied to clipboard
interface XRSessionInit
Link copied to clipboard
sealed interface XRSessionMode
Link copied to clipboard
open class XRSpace : EventTarget

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.

Link copied to clipboard
open class XRSubImage
Link copied to clipboard
open class XRSystem : EventTarget
Link copied to clipboard
sealed interface XRTargetRayMode
Link copied to clipboard
sealed interface XRTextureType
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open class XRView

Describes a single view into an XR scene for a given frame.

Link copied to clipboard
open class XRViewerPose : XRPose

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.

Link copied to clipboard
open class XRViewport

Describes a viewport, or rectangular region, of a graphics surface.

Link copied to clipboard
sealed interface XRVisibilityState
Link copied to clipboard
open class XRWebGLBinding(session: XRSession, context: WebGLRenderingContext)
Link copied to clipboard
Link copied to clipboard
open class XRWebGLLayer(session: XRSession, context: WebGLRenderingContext, layerInit: XRWebGLLayerInit = definedExternally) : XRLayer

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

Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
inline suspend fun XRSession.end()

Ends the WebXR session. Returns a promise which resolves when the session has been shut down.

Link copied to clipboard

Queries if a given mode may be supported by the user agent and device capabilities.

Link copied to clipboard

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.

Link copied to clipboard
inline suspend fun XRSystem.requestSession(mode: XRSessionMode): XRSession
inline suspend fun XRSystem.requestSession(mode: XRSessionMode, options: XRSessionInit): XRSession

Attempts to initialize an XRSession for the given mode if possible, entering immersive mode if necessary.

Link copied to clipboard
inline suspend fun XRSession.updateRenderState()
inline suspend fun XRSession.updateRenderState(renderStateInit: XRRenderStateInit)
Link copied to clipboard
inline suspend fun XRSession.updateTargetFrameRate(rate: Float)