XRProjectionLayer

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 XRProjectionLayer của WebXR Device API là một layer lấp đầy toàn bộ tầm nhìn của người quan sát và được làm mới gần với tốc độ frame tự nhiên của thiết bị.

XRProjectionLayer được hỗ trợ bởi tất cả các đối tượng XRSession (không cần mô tả tính năng layers).

Để tạo một XRProjectionLayer mới, hãy gọi XRWebGLBinding.createProjectionLayer(). Để trình bày các layer cho thiết bị XR, hãy thêm chúng vào trạng thái kết xuất layers bằng XRSession.updateRenderState().

Các đối tượng XRProjectionLayer không có XRSpace liên quan, vì chúng kết xuất toàn bộ frame.

EventTarget XRLayer XRCompositionLayer XRProjectionLayer

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

Kế thừa các thuộc tính từ giao diện cha, XRCompositionLayerEventTarget.

XRProjectionLayer.fixedFoveation Experimental

Một số cho biết mức độ foveation được compositor XR sử dụng cho layer. Fixed Foveated Rendering (FFR) kết xuất các cạnh của texture mắt ở độ phân giải thấp hơn so với trung tâm và giảm tải GPU.

XRProjectionLayer.ignoreDepthValues Read only Experimental

Một giá trị boolean cho biết rằng compositor XR không sử dụng các giá trị depth buffer khi kết xuất layer.

XRProjectionLayer.textureArrayLength Read only Experimental

Số lượng layer của layer cho texture mảng khi sử dụng texture-array làm textureType.

XRProjectionLayer.textureHeight Read only Experimental

Chiều cao tính bằng pixel của texture màu sắc của layer này.

XRProjectionLayer.textureWidth Read only Experimental

Chiều rộng tính bằng pixel của texture màu sắc của layer này.

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

Kế thừa các phương thức từ giao diện cha, XRCompositionLayerEventTarget.

Thông số kỹ thuật

Specification
WebXR Layers API Level 1
# xrprojectionlayertype

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

Xem thêm