XRCPUDepthInformation

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

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

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Giao diện XRCPUDepthInformation chứa thông tin độ sâu từ CPU (được trả về bởi XRFrame.getDepthInformation()).

XRDepthInformation XRCPUDepthInformation

Giao diện này kế thừa các thuộc tính từ lớp cha XRDepthInformation.

Thuộc tính phiên bản

XRCPUDepthInformation.data Read only Experimental

Một ArrayBuffer chứa thông tin bộ đệm độ sâu ở định dạng thô.

XRDepthInformation.height Read only

Chứa chiều cao của bộ đệm độ sâu (số hàng).

XRDepthInformation.normDepthBufferFromNormView Read only

Một XRRigidTransform cần được áp dụng khi lập chỉ mục vào bộ đệm độ sâu. Phép biến đổi mà ma trận đại diện thay đổi hệ tọa độ từ tọa độ view chuẩn hóa sang tọa độ bộ đệm độ sâu chuẩn hóa, sau đó có thể được chia tỷ lệ theo widthheight của bộ đệm độ sâu để lấy tọa độ bộ đệm độ sâu tuyệt đối.

XRDepthInformation.rawValueToMeters Read only

Chứa hệ số tỷ lệ mà các giá trị độ sâu thô phải được nhân với để lấy độ sâu tính bằng mét.

XRDepthInformation.width Read only

Chứa chiều rộng của bộ đệm độ sâu (số cột).

Phương thức phiên bản

XRCPUDepthInformation.getDepthInMeters() Experimental

Trả về độ sâu tính bằng mét tại (x, y) trong tọa độ view chuẩn hóa.

Thông số kỹ thuật

Specification
WebXR Depth Sensing Module
# xr-cpu-depth-info-section

Tương thích trình duyệt

Xem thêm