XR

Properties of a WebXR session

.constructor(wasm: any, mode: XRSessionMode) ⇒ XR 

ParamTypeDescription
wasmany
modeXRSessionMode

.baseLayer: XRProjectionLayer 

Current WebXR base layer

.currentReferenceSpace: XRReferenceSpace 

Current reference space type used for retrieving eye, head, hand and joint poses

.currentReferenceSpace 

Set current reference space type used for retrieving eye, head, hand and joint poses

.currentReferenceSpaceType: XRReferenceSpaceType 

Current WebXR reference space type or null if not a default reference space

.frame: XRFrame 

Current WebXR frame

.framebuffers: WebGLFramebuffer[] 

Current WebXR framebuffer

.session: XRSession 

Current WebXR session

.sessionMode: XRSessionMode 

Current WebXR session mode

.referenceSpaceForType(type: XRReferenceSpaceType) ⇒ null | XRReferenceSpace 

.referenceSpaceForType(type: ‘viewer’) ⇒ XRReferenceSpace

Get a WebXR reference space of a given reference space type.

Returns: Reference space, or null if there’s no reference space of the requested type available

ParamTypeDescription
typeXRReferenceSpaceTypeType of reference space to get