草案
此页面不完整。
安全上下文
此特征只可用于
安全上下文
(HTTPS),在某些或所有
支持浏览器
.
XRFrame
方法
getPose()
returns the relative position and orientation—the pose—of one
XRSpace
to that of another space.
With this, you can observe the motion of objects relative to each other and to fixed locations throughout the scene.
For example, to get the position of a controller relative to the viewer's head, you would compare the controller's
gripSpace
到
XRReferenceSpace
类型
viewer
.
var xrPose = xrFrame.getPose(space, baseSpace);
space
XRSpace
specifying the space for which to obtain an
XRPose
describing the item's position and orientation.
baseSpace
XRSpace
to use as the base or origin for the purposes of computing the relative position and orientation.
XRPose
object specifying the position and orientation, relative to the
XRSpace
indicated by
baseSpace
.
| 规范 | 状态 | 注释 |
|---|---|---|
|
WebXR 设备 API
The definition of 'XRFrame.getPose()' in that specification. |
工作草案 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
getPose()
|
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 |
完整支持
不支持
实验。期望将来行为有所改变。
XRFrame
getPose()
getViewerPose()