Function enterXr
-
Parameters
- scene: SceneContext
A registered scene (call
registerScenebefore entering). - options: XrSessionOptions = {}
Session configuration; see XrSessionOptions.
Returns Promise<XrSessionContext>
The active XrSessionContext.
- scene: SceneContext
Enter an immersive WebGPU XR session that renders
scenestereoscopically.Requires the draft WebXR/WebGPU binding (
XRGPUBinding), which no browser implements yet — call isXrSessionSupported first and gate your UI on it. The engine's adapter must be XR-compatible — call enableXrCompatibleAdapter beforecreateEngine; otherwise the binding throws and this rejects. The normal canvas render loop is stopped for the session's duration and resumed when it ends.