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.
Thuộc tính phiên bản
Kế thừa các thuộc tính từ giao diện cha, XRCompositionLayer và EventTarget.
XRProjectionLayer.fixedFoveationExperimental-
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.ignoreDepthValuesRead 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.textureArrayLengthRead only Experimental-
Số lượng layer của layer cho texture mảng khi sử dụng
texture-arraylàmtextureType. XRProjectionLayer.textureHeightRead only Experimental-
Chiều cao tính bằng pixel của texture màu sắc của layer này.
XRProjectionLayer.textureWidthRead 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, XRCompositionLayer và EventTarget.
Thông số kỹ thuật
| Specification |
|---|
| WebXR Layers API Level 1> # xrprojectionlayertype> |