XRSpace - Web APIs 编辑

Draft

This page is not complete.

Secure context

This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The XRSpace interface of the WebXR Device API is an abstract interface providing a common basis for every class which represents a virtual coordinate system within the virtual world, in which its origin corresponds to a physical location. Spatial data in WebXR is always expressed relative to an object based upon one of the descendant interfaces of XRSpace, at the time at which a given XRFrame takes place.

Numeric values such as pose positions are thus coordinates in the corresponding XRSpace, relative to that space's origin.

Note: The XRSpace interface is never used directly; instead, all spaces are created using one of the interfaces based on XRSpace. At this time, those are XRReferenceSpace and XRBoundedReferenceSpace.

Interfaces based on XRSpace

Below is a list of interfaces based on the XRSpace interface.

XRBoundedReferenceSpace
Represents a reference space which may move within a region of space whose borders are defined by an array of points laid out in clockwise order along the floor to define the passable region of the space. The origin of an XRBoundedReferenceSpace is always at floor level, with its X and Z coordinates typically defaulting to a location near the room's center.
XRReferenceSpace
Represents a reference space which is typically expected to remain static for the duration of the XRSession. While objects may move within the space, the space itself remains fixed in place. There are exceptions to this static nature; most commonly, an XRReferenceSpace may move in order to adjust based on reconfiguration of the user's headset or other motion-sensitive device.

Properties

The XRSpace interface defines no properties of its own; however, it does inherit the properties of its parent interface, EventTarget.

Methods

The XRSpace interface provides no methods of its own. However, it inherits the methods of EventTarget, its parent interface.

Specifications

SpecificationStatusComment
WebXR Device API
The definition of 'XRSpace' in that specification.
Working DraftInitial definition.

Browser compatibility

BCD tables only load in the browser

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

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

发布评论

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

词条统计

浏览:122 次

字数:4164

最后编辑:7 年前

编辑次数:0 次

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