草案
此页面不完整。

emulatedPosition read-only attribute of the XRPose interface is a Boolean value indicating whether or not both the the 位置 component of the pose's transform is directly taken from the XR device, or it's simulated or computed based on other sources.

句法

let emulated = xrPose.emulatedPosition;
					

A Boolean which is true if the pose's position is computed based on estimates or is derived from sources other than direct sensor data. If the position is precisely gbased on direct sensor inputs, the value is false .

用法注意事项

There are two basic categories of XR tracking systems. A basic XR headset provides three degrees of freedom (3DoF), tracking the pitch, yaw, and roll of the user's head. No information is available about movement forward, backward, or to the sides. Any such data is taken from other sources, such as keyboard or mouse inputs or game controllers. As such, the position is considered to be emulated, so the emulatedPosition 特性为 true .

Contrariwise, XR devices which can also track movement forward and backward as well as laterally—six degree of freedom (6DoF) devices—don't require any information from other sources to determine the user's position, so the value of emulatedPosition is false .

The same notion applies not just to the user's head, but to any object. A hand controller that can directly report its position would have a value of false for this property as well. If its position is computed as an offset from another object (such as by basing it off the model representing the user's body), then this value is true .

This information is important because devices whose position is emulated are prone to their offset drifting relative to the real world space over time. This is because emulating a position based on accelerometer inputs and models tends to introduce minor errors which accumulate over time.

规范

规范 状态 注释
WebXR 设备 API
The definition of 'XRPose.emulatedPosition' in that specification.
工作草案 初始定义。

浏览器兼容性

更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
emulatedPosition Chrome 79 Edge 79 Firefox 不支持 No IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 不支持 No Chrome Android 79 Firefox Android 不支持 No Opera Android 不支持 No Safari iOS 不支持 No Samsung Internet Android 11.2

图例

完整支持

完整支持

不支持

不支持

元数据

  • 最后修改:
  1. XRPose
  2. 特性
    1. emulatedPosition
    2. transform