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}

Parameters:
NameTypeAttributesDefaultDescription
settingsObject
sessionModestring<optional>
immersive-vr

WebXR session mode. See XRSessionMode.

referenceSpaceTypestring<optional>
local

WebXR type of reference space. See XRReferenceSpaceType.

layerInitObject<optional>
{}

An object conforming to the XRWebGLLayerInit dictionary, providing configuration options for the XRWebGLLayer.

forceSingleViewboolean<optional>
false

If true then use a single 3dverse viewrport bound to the first view of the XRViewerpose.views

worldTransformTransform<optional>
null

A transform used to shift the XRView.transform, the current SDK3DVerse.WebXR implementation only supports worldTransform.position so far.

useOffscreenCanvasboolean<optional>
true

If false then replace the OffscreenCanvas used by the SDK3DVerse decoder

Returns:

A Promise that resolves with an XRSession

Type: 
XRSession