Movatterモバイル変換


[0]ホーム

URL:


MDN Web Docs

XRDepthInformation

Limited availability

Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.

Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.

TheXRDepthInformation interface contains information about the distance from the user's device to the real-world geometry in the user's environment.

This interface is the parent of:

XRCPUDepthInformation

Depth information from the CPU (returned byXRFrame.getDepthInformation()).

XRWebGLDepthInformation

Depth information from WebGL (returned byXRWebGLBinding.getDepthInformation()).

You will usually interact with these child interfaces. However,XRDepthInformation provides some useful properties that are inherited:

Instance properties

XRDepthInformation.heightRead onlyExperimental

Contains the height of the depth buffer (number of rows).

XRDepthInformation.normDepthBufferFromNormViewRead onlyExperimental

AnXRRigidTransform that needs to be applied when indexing into the depth buffer. The transformation that the matrix represents changes the coordinate system from normalized view coordinates to normalized depth-buffer coordinates that can then be scaled by depth buffer'swidth andheight to obtain the absolute depth-buffer coordinates.

XRDepthInformation.rawValueToMetersRead onlyExperimental

Contains the scale factor by which the raw depth values must be multiplied in order to get the depths in meters.

XRDepthInformation.widthRead onlyExperimental

Contains the width of the depth buffer (number of columns).

Instance methods

None.

Examples

Specifications

Specification
WebXR Depth Sensing Module
# xrdepthinformation

Browser compatibility

See also

Help improve MDN

Learn how to contribute.

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp