Skip to content

Add WebXR VR support with Game.enableXR() - #85

Merged
mattvb91 merged 1 commit into
devfrom
feature/webxr-vr
Nov 25, 2026
Merged

mattvb91 merged 1 commit into
devfrom
feature/webxr-vr

Conversation

@mattvb91

Copy link
Copy Markdown
Member

The render loop now runs through the renderer's setAnimationLoop, since a WebXR session only hands out frames through the session. While presenting, the renderer skips the EffectComposer (it can't render stereo), ignores maxFps and skips resizes, which the session owns.

Game.enableXR() turns on renderer.xr with a local-floor reference space, adds an Enter VR button (or xr.enter() from the game's own UI) and triggers xrSessionStart / xrSessionEnd on the game.

@mattvb91
mattvb91 added this pull request to stack #87 November 25, 2026 15:19
The render loop now runs through the renderer's setAnimationLoop, since a
WebXR session only hands out frames through the session. While presenting,
the renderer skips the EffectComposer (it can't render stereo), ignores
maxFps and skips resizes, which the session owns.

Game.enableXR() turns on renderer.xr with a local-floor reference space,
adds an Enter VR button (or xr.enter() from the game's own UI) and triggers
xrSessionStart / xrSessionEnd on the game.
@mattvb91
mattvb91 merged commit 5c5c6f3 into dev Nov 25, 2026
25 checks passed
@mattvb91
mattvb91 deleted the feature/webxr-vr branch November 25, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant