XR
Properties of a WebXR session
- XR
- .constructor(wasm, mode) ⇒ XR
- .baseLayer
- .currentReferenceSpace
- .currentReferenceSpaceType
- .frame
- .framebuffers
- .session
- .sessionMode
- .referenceSpaceForType(type) ⇒ null | XRReferenceSpace
.constructor(wasm: any, mode: XRSessionMode) ⇒ XR
Param | Type | Description |
---|---|---|
wasm | any | |
mode | XRSessionMode |
.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
Param | Type | Description |
---|---|---|
type | XRReferenceSpaceType | Type of reference space to get |