XRDepthInformation:height 属性
XRDepthInformation 接口中**只读**的 height 属性包含深度缓冲器的高度(行数)。
值
无符号长整型。
示例
使用 XRFrame.getDepthInformation() (CPU) 或 XRWebGLBinding.getDepthInformation() (WebGL) 来获取深度信息。返回的对象将包含深度缓冲器的 height,您可以将其用于进一步的计算。
js
const smallerDepthDimension = Math.min(depthInfo.width, depthInfo.height);
const largerDepthDimension = Math.max(depthInfo.width, depthInfo.height);
规范
| 规范 |
|---|
| WebXR Depth Sensing 模块 # dom-xrdepthinformation-height |
浏览器兼容性
加载中…