How we test a WebXR game without a headset
Every save of a GameCrew AI VR game runs in headless Chrome with an emulated Quest 3: it enters VR, draws both eyes, follows the head, reads the controllers.
What you’ll have at the endYou’ll know what the emulated-headset check proves about a VR game, what it doesn’t, and where its result is.
What you need
- Nothing: the check runs by itself on every save of a VR game, in Quick (three.js), Godot 4 and Unity 6.
Steps
Boot with an emulated headset
The browser build starts in headless Chrome with an emulated headset: IWER, Meta’s WebXR runtime in JavaScript, with a Quest 3 profile, loaded from the studio with no network. It is the real WebXR API against an emulated device. The game must log
[game] start,ccgdVr.supported()must be true, and the Enter VR button must be visible.Press Enter VR
A click on the button starts the session: it is active, XR frames keep coming, and the game logs
[game] vr enter.Two eyes, two viewpoints
A picture,
vr_stereo.png: each eye’s half must be drawn (not one flat colour) and the halves must differ. With both eyes put at one point, the halves must match: two views of one scene, not one picture stretched across both.The head moves the view
The head turns 120°: the picture changes and the game’s heading follows. Turned back, the picture returns, which tells a head turn from the game’s own animation. The head moves 0.4 m and the game’s head position follows.
The controllers drive the game
The left stick is pushed forward: the game’s move input goes forward. The right trigger is held: the game sees
right-trigger.A standalone headset’s budget
Draw calls and triangles of a frame are measured against 200 draw calls and 300,000 triangles. Over the budget is a note on the version, not a failure.
Exit back to flat
The session ends, the game logs
[game] vr exit, and the flat game keeps running.No errors anywhere
Any page error or console error during all of it fails the check.
Read the result
A failure is a failed browser check of that version, its errors starting with “VR check (emulated headset):”. The stereo picture is kept with the version’s pictures. A game that isn’t a VR game is not checked.
What it can’t tell you
It proves the game enters VR, draws both eyes, follows the head and reads the controllers. It does not measure comfort, or the frame rate on a real headset. Play it on one too.
The page’s side
Every VR game’s page shows Enter VR only when the browser can start an immersive session, asks for local-floor (falling back to local), fetches nothing from the network for controllers or hands, and gives the check window.ccgdVr to read the game’s state.
Play one first
Technique guides
- VR hands, throws and comfort in Godot 4
- VR hands, throws and comfort in Three.js
- VR hands, throws and comfort in Unity 6
More
Play a VR game now
Open one in your headset’s browser and press Enter VR, or play it flat here.