Create a WebXR session, set viewports and update camera from XRViewerPose. The current implementation only support software decoding (see hardwareDecoding option in the SDK3DVerse methods to start or join a session).
This extension is not supported in hardware decoding mode.
Methods
(async) createSession(settings) → {XRSession}
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
settings | Object | |||
sessionMode | string | <optional> | immersive-vr | WebXR session mode. See XRSessionMode. |
referenceSpaceType | string | <optional> | local | WebXR type of reference space. See XRReferenceSpaceType. |
layerInit | Object | <optional> | {} | An object conforming to the XRWebGLLayerInit dictionary, providing configuration options for the XRWebGLLayer. |
forceSingleView | boolean | <optional> | false | If true then use a single 3dverse viewrport bound to the first view of the XRViewerpose.views |
worldTransform | Transform | <optional> | null | A transform used to shift the XRView.transform, the current SDK3DVerse.WebXR implementation only supports worldTransform.position so far. |
useOffscreenCanvas | boolean | <optional> | true | If false then replace the OffscreenCanvas used by the SDK3DVerse decoder |
A Promise that resolves with an XRSession
- Type:
- XRSession