Does my browser support WebXR?
Your browser does not support WebXR, but does support the deprecated WebVR API. You may be able to run Virtual Reality experiences on sites that use the WebXR Polyfill, like this one!
Sample pages demonstrating how to use various aspects of the WebXR API.
Learn More
Immersive VR Session
Basics
Demonstrates use of an “immersive-vr” XRSession to present a WebGL scene on an VR headset.SourceRun Without Polyfill
Immersive AR Session
Basics
Demonstrates use of an “immersive-ar” XRSession to present a WebGL scene on an AR-enabled phone or headset.SourceRun Without Polyfill
Inline Session
Basics
Demonstrates use of an “inline” XRSession to present the same WebGL scene on the page and on an XR device.SourceRun Without Polyfill
Reduced-Bind Rendering
Performance
Demonstrates a technique to reduce the number of state changes made while rendering.SourceRun Without Polyfill
Room Scale
Basics
Demonstrates using a “local-floor” reference space to provide room scale tracking.SourceRun Without Polyfill
Input Tracking
Input
Demonstrates basic tracking and rendering of XRInputSources.SourceRun Without Polyfill
Input Profiles
Input
Demonstrates loading appropriate controller models based on the XRInputSources profiles array.SourceRun Without Polyfill
Input Selection
Input
Demonstrates handling ‘select’ events generated by XRInputSources.SourceRun Without Polyfill
Controller State
Input
Demonstrates responding to controller state from an XRInputSource’s gamepad attribute.SourceRun Without Polyfill
Framebuffer Scaling
Performance
Demonstrates scaling a layer’s framebuffer to statically control performance or quality.SourceRun Without Polyfill
360 Stereo Photos
Content
Demonstrates displaying a 360 degree equirectangular stereo photo.SourceRun Without Polyfill
Stereo Video
Content
Demonstrates playing stereo videos.SourceRun Without Polyfill
Positional Audio
Content
Demonstrates playing audio that sounds as if it originates at a specific point in the space.SourceRun Without Polyfill
Spectator Mode
Advanced Techniques
Demonstrates rendering a 3rd person view of the scene to an external monitor.SourceRun Without Polyfill
Teleportation
Advanced Techniques
Demonstrates teleporting the viewer around the scene with getOffsetReferenceSpace().SourceRun Without Polyfill
Hit Test
AR Basics
Demonstrates using the Hit Test API to place virtual objects on real-world surfaces.SourceRun Without Polyfill
Barebones VR
No Dependencies
Extremely simple use of “immersive-vr” sessions with no library dependencies. Doesn’t render anything exciting.Source
Barebones AR
No Dependencies
Extremely simple use of “immersive-ar” sessions with no library dependencies. Doesn’t render anything exciting.Source
Models used in these samples come from Poly, and many were modeled in Blocks.
They a stored and loaded using the glTF 2.0 format.
Attribution for individual models can be found under the media/gltf folders for this repository.