Skip to main content

VR

info

VR only works in Secure contexts, run server with TLS/SSL(HTTPS) if it doesn't works.

View360 can enter VR session by calling view360.vr.enter().
All projections except LittlePlanetProjection support VR.

const view360 = new View360(...);

// button onclick or somewhere...
view360.vr.enter();

Prerequisites (for users)

VR requires special device for display.
The user must have one of the following devices to use VR feature:

WebXR API & WebVR API (deprecated)

  • View360 only supports WebXR API, not WebVR API.
  • You can try using webxr-polyfill for environments where WebXR is not supported.

iOS

iOS doesn't support WebXR Device API at the moment writing this document.
So, you can't basically enter VR sessions in iOS, also ControlBar's VR button won't show up.
You can try using WebXR Polyfill, but it won't work perfectly due to the following reason.

Fullscreen

  • iOS doesn't support Fullscreen API regardless of browser.
  • As fullscreen API is required feature to render VR, it's almost impossible in iOS to render VR contents properly.
  • So, you can try to connect the native iOS app with the same service if you have any, or you can try PWA.

iOS 13+

  • View360 includes whether device motion is enabled before entering VR.
  • If you don't include permission check before entering VR, vr.enter() will pop up a native dialog to ask the user whether to permit device motion.