大网数据广告活动
Web 标准与前端开发

XRWebGLBinding

· 52CE 我爱测

The **`XRWebGLBinding`** interface is used to create layers that have a GPU backend.

WebXR Device API

The XRWebGLBinding interface is used to create layers that have a GPU backend.

Constructor

  • XRWebGLBinding.XRWebGLBinding
    • : Creates a new XRWebGLBinding object for the specified XR session and WebGL rendering context.

Instance properties

  • XRWebGLBinding.nativeProjectionScaleFactor
    • : The scaleFactor that was passed in during the construction of the projection layer. The native buffer size is scaled by this number.

Instance methods

  • XRWebGLBinding.createCubeLayer()
    • : Returns an XRCubeLayer object, which is a layer that renders directly from a cubemap, and projects it onto the inside faces of a cube.
  • XRWebGLBinding.createCylinderLayer()
    • : Returns an XRCylinderLayer object which is a layer that takes up a curved rectangular space in the virtual environment.
  • XRWebGLBinding.createEquirectLayer()
    • : Returns an XREquirectLayer object which is a layer that maps equirectangular coded data onto the inside of a sphere.
  • XRWebGLBinding.createProjectionLayer()
    • : Returns an XRProjectionLayer object which is a layer that fills the entire view of the observer and is refreshed close to the device's native frame rate.
  • XRWebGLBinding.createQuadLayer()
    • : Returns an XRQuadLayer object which is a two-dimensional object positioned and oriented in 3D space.
  • XRWebGLBinding.getDepthInformation()
    • : Returns an XRWebGLDepthInformation object containing WebGL depth information.
  • XRWebGLBinding.getReflectionCubeMap()
    • : Returns a WebGLTexture object containing a reflection cube map texture.
  • XRWebGLBinding.getSubImage()
    • : Returns an XRWebGLSubImage object representing the WebGL texture to render.
  • XRWebGLBinding.getViewSubImage()
    • : Returns an XRWebGLSubImage object representing the WebGL texture to render for an XRView.

Specifications

Browser compatibility

See also

  • XRWebGLLayer
  • WebGLRenderingContext and WebGL2RenderingContext

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。