XRWebGLLayer

open class XRWebGLLayer(session: XRSession, context: WebGLRenderingContext, layerInit: XRWebGLLayerInit = definedExternally) : XRLayer(source)

A layer which provides a WebGL framebuffer to render into, enabling hardware accelerated rendering of 3D graphics to be presented on the XR device. * ref: https://immersive-web.github.io/webxr/#xrwebgllayer-interface

Constructors

Link copied to clipboard
constructor(session: XRSession, context: WebGLRenderingContext, layerInit: XRWebGLLayerInit = definedExternally)
constructor(session: XRSession, context: WebGL2RenderingContext, layerInit: XRWebGLLayerInit = definedExternally)

Properties

Link copied to clipboard
external val antialias: Boolean
Link copied to clipboard
external var fixedFoveation: Float?
Link copied to clipboard
Link copied to clipboard
external val framebufferHeight: Int
Link copied to clipboard
external val framebufferWidth: Int
Link copied to clipboard

Functions

Link copied to clipboard
open external fun dispatchEvent(event: Event): Boolean
Link copied to clipboard
external fun getViewport(view: XRView): XRViewport?
Link copied to clipboard
external fun <T : Event> when(type: EventType<T>, options: ObservableEventListenerOptions?): Observable<T>