XRSessionInit - Web APIs 编辑

Draft

This page is not complete.

The WebXR Device API dictionary XRSessionInit specifies required and/or optional features when requesting a new XRSession by calling the navigator.xr.requestSession() method.

Properties

The following parameters are all optional. If none are included, the device will use a default feature configuration for all options.

optionalFeatures Optional
An array of values identifying features which the returned XRSession may optionally support. At this time, all features are identified using strings from the XRReferenceSpaceType enumeration, but future updates to the WebXR standard may add more features.
requiredFeatures Optional
An array of values which the returned XRSession must support. These values currently must come from the enumerated type XRReferenceSpaceType. More features may be added in future updates to the WebXR standard.

Default features

Immersive sessions

All immersive (both immersive-vr and immersive-ar)  sessions support both the viewer and local reference spaces.

Because immersive sessions are required to support the local reference space, any request to open an immersive XRSession is required to obtain explicit or implicit user consent.

Inline sessions

All inline WebXR sessions support the viewer reference space.

Security requirements

Each reference space or feature type has minimum safety requirements. By session type, those are:

Reference space typeUser consent rquirementFeature policy requirement
bounded-floorAlways requiredxr-spatial-tracking
localAlways required for inline sessionsxr-spatial-tracking
local-floorAlways requiredxr-spatial-tracking
unboundedAlways requiredxr-spatial-tracking
viewerAlways required

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:109 次

字数:3844

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文